Mongout cannot modify the root password in system recovery mode for analysis and solution. mongoutroot
Some days ago, the cat's ubuntu 14.10 seemed to have a problem. I wanted to change the root password, but the original system was wrong. Normally, I could not change the password. Is this the rhythm that forces me to reinstall it?
After ubuntu is started, immediately press left_shift to bring up the grub menu. The grub menu is hidden by default because I have not installed a dual system. Select "advanced options"> xxx (recovery mode)> root. Login, you still need the root password to enter the recovery mode console! Then ctl + d, restart the system again, enter the xxx (recovery mode) Main Interface (do not press enter, just select its row), press e to enter the editing mode:
Press the downward arrow key, find a row containing recovery, and change recovery nomodeset to single init =/bin/bash. After modification, press the F10 key to immediately reboot to shell. We can find that the current identity is root, but we do not need to enter the password!
The next step is to change the password. It's easy. Use passwd! Failed. What's wrong!
The mount command shows that the permission for the/partition is ro. How can this problem be solved?
Okay. Change it to rw again:
Now try again passwd, And the success is:
In fact, in the previous grub modification step, you can also first modify: rw single init =/bin/bash, so you don't need to change it later!
In linux, the root password cannot be changed in single-user mode.
Cat/etc/passwd: Is there any suspicious account? A single user should be allowed. You can try it in repair mode.
Ubuntu1004 forgot the account password and root Password: The last password in the recovery mode
When the grub menu appears, press the key to enter the Kernel Parameter mode, enter the number 1 at the end, enter the single user mode, enter the character logon interface, and start to change the password
# Passwd
Enter New Password
Try again
# Exit and restart
Then, log on with the root and new password.