Ubuntu root password forgot-restore

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.