How can I log on if the root user forgets the password?
Linux_rootforgot the password.
The answer is to use passwd to change the password after entering the system in single-user mode. How can this problem be achieved?
The following uses redhead Linux as an example to describe
Follow these steps:
1After the instance is started, go to the grub page, select rea Hat Enterprise Linux as-up (2.6.9-42.el), and press the e key to enter the editing page.
2, Enter and then select
Kernel/boot/vmlinuz-2.6.9-42.EL Ro root = label =/rhgb quietAnd press the e key again to enter the editing page.
3After entering the editing page
After adding the number 1 or single to kernel/boot/vmlinuz-2.6.9-42.EL Ro root = label =/rhgb quiet, press enter to confirm.
4, OK, go back to the editing interface on the previous layer, and press the B key to restart in simple mode.
5The following is the restart process. Let's take a closer look !!!
6After the restart, you will be able to change the password on the following page.
7Directly enter passwd (some systems are in lower case) and press enter to change the password. By default, press enter to directly change the password of the root Super management user. Of course, to change the password of another user, follow the user name to change the password after passwd.
8Is the password modification process, the first time you modify the default password, forget the shortest, O (∩ _ ∩) O ...!!
But the modification is successful.
9And then restart with exit.
In this way, the password of the root Super User is changed. It's easy! But you will think that it is not safe to modify the super-managed password at will !!!