Ubuntu root Password Forget-resume 2012-04-27 11:09:22
Category: LINUX
Method One:
If the user has sudo permissions, you can run the following command directly:
#sudo su Root
#passwd
#更改密码
Alternatively, you can directly change the root password by running the sudo passwd root command directly.
Differences about sudo su:
1. Common denominator: Both are the root user's privileges;
2. Different points: Su only get root permissions, the work environment is not changed, or the user's working environment before switching; Sudo is fully rooted and rooted in the working environment.
Reference: http://www.cnblogs.com/ljf181275034/archive/2011/09/14/2176704.html
Method Two:
If the user does not have sudo permissions, then method one is not available and needs to go into grub to modify the kernel mirroring boot parameters. The Ubuntu version used in this article is 11.04, and the process is as follows:
1 Restart the ESC key or the F2 key to enter the Grub boot mode as shown, select the second row of recovery mode.
2 an E Enter recovery mode to compile kernel for startup parameters
3 in Linux/boot/vmlinuz ... Add quiet Splash rw Init=/bin/bash after this line. Then CTRL + X can be run directly.
4 after running the system directly into root mode, at this time run the passwd command to change the password.
Ubuntu root password forgot-restore