Root user Password change, password forgotten in Linux

Source: Internet
Author: User

When the user sets bash, the error is to change the root bash to Bin/bash, note that it is not "/bin/bash"!. Then can not login root, also can not modify/etc/passwd. Resolution: 1, restart Ubuntu, then long press Shift into the Grub menu, 2, select recovery mode, that is Ubuntu,with Linux 3.2.0-23-generic (Recovery mode), press E, edit the startup parameters; 3. Change the RO recovery nomodeset to RW single init=/bin/bash;4, and then press ctrl+x or F10 to go to one-user mode, modify/etc/passwdroot:x:0:0:mysql User:/roo T:bin/bash instead: Root:x:0:0:mysql user:/root:/bin/bash restart. -----------------detailed pictures and texts are as follows: root User Change Password method
Restart Ubuntu, then long press SHIFT to enter the Grub menu;
Select recovery mode, Ubuntu,with Linux 3.2.0-23-generic (Recovery mode), press E, edit the startup parameters,
such as
change ro recovery nomodeset to RW single Init=/bin/bash
such as

Then press ctrl+x or F10 to enter single-user mode,
Restart Ubuntu, then long press SHIFT to enter the Grub menu;
Select recovery mode, enter confirm;
In recovery menu, select "root Drop to root shell prompt", enter confirm, such as;

Enter the shell interface and use the passwd command to reset the password: passwd root
Enter a new password;
Confirm the new password again;
See password setting successful prompt: Passwd:password updated successfully;
Reboot the system into GUI interface: sudo reboot;--------------reference: "1" How to reset Ubuntu login password and root user login system http://13521308103.iteye.com/blog/1930322

Root user Password change, password forgotten in Linux

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.