In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What is the method of resetting root password under different operating systems? I believe many inexperienced people don't know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
To reset the server's root password, you need to boot to single user mode.
Access the administrative portion of the server in the customer portal and follow these steps. This option depends on the version of the boot loader on the machine:
CentOS 6
Click the View console to access the console, and click the send ctrl+alt+del button at the top right. Alternatively, you can click restart to restart the server.
2. You will see a GRUB boot prompt that prompts you to press any key-- it only takes you a few seconds to press a key to stop the auto-boot process. (if you miss this prompt, you will need to restart VM)
3. At the GRUB prompt, type "a" to attach to the boot command.
4. Add the text "single" and press enter.
5. The system will start and you will see the root prompt. Enter "passwd" to change the root password, and then restart.
CentOS 7
Click the View console to access the console, and click the send ctrl+alt+del button at the top right. Alternatively, you can click restart to restart the server.
2. Once the startup process starts, press ESC to open the GRUB boot prompt. You may need to shut down the system from the control panel and return to the GRUB boot prompt.
3. You will see a GRUB boot prompt-press "e" to edit the first startup option. (if you do not see the GRUB prompt, you may need to press any key to start the machine before it starts)
4. Find the kernel line (starting with "linux16") and change ro to rw init=/sysroot/bin/sh.
5. Press ctrl-x or F10 to boot single-user mode.
6. Use commands to access the system: chroot/sysroot.
Run passwd to change the root password.
8. Restart the system: restart-f.
Debian,Ubuntu
Click the View console to access the console, and click the send ctrl+alt+del button at the top right. Alternatively, you can click restart to restart the server.
2. Once the startup process starts, press ESC to open the GRUB boot prompt. You may need to shut down the system from the control panel and return to the GRUB boot prompt.
3. You will see a GRUB boot prompt-press "e" to edit the first startup option. (if you do not see the GRUB prompt, you may need to press any key to start the machine before it starts)
4. Find the kernel line (starting with "linux / boot /") and add the end line of init = / bin / bash (linux16 may start on the 7th line of CentOS).
5. Press CTRL-X or F10 to boot.
6. The system will start and you will see the root prompt. Enter "Shan-r-o reinstall /" and then "passwd" to change the root password, and then restart.
FreeBSD
The boot menu has an option to boot to single-user mode. Press the key in user mode (2), enter "passwd" at the root prompt to change the root password, and then restart.
CoreOS
By default, CoreOS uses SSH key authentication. In Vultr, the root user and password are created. If you selected the SSH key when you created the VPS, you can log in using that SSH key as the user's "core".
You can reset the standard root login by executing "sudo passwd" as the "core" of the user. First log in to "core" using the SSH key.
If you lose your SSH key, you can log in as a "core" user by editing the grub loader. Follow these steps:
Click the View console to access the console, and click the send ctrl+alt+del button at the top right. Alternatively, you can click restart to restart the server.
2. You will see a GRUB boot prompt-press "e" to edit the first startup option. (if you do not see the GRUB prompt, you may need to press any key to start the machine before it starts)
3. At the end of the line that starts with "linux$", add "coreos". Autologin = tty1 "(no references).
4. Press ctrl-x or F10 to start. When the system starts, you will be recorded as the "core".
5. Remember to restart the server after you reset the login.
After reading the above, do you know how to reset root passwords in different operating systems? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.