A workaround for forgetting your username and password under Linux

Source: Internet
Author: User

Today with the VMware Workstation installed Ubuntu, do not remember the user name and password is what, depressed, fortunately, Ubuntu modified password is very simple, the method is as follows:

Enter the shell (Drop to root shell prompt)

1. In the Ubuntu boot screen, press SHIFT key to enter the Grub interface, select the second entry, enter recovery mode


2. In recovery mode, select root


Find User Name

Enter Cat/etc/shadow in the Shell to list all user names


You can see the forgotten username on the third line.

Change Password

Enter the passwd+ username after entering the new password according to the prompt, sometimes prompted authentication token manipulation error, this is because the password file is read-only, you need to input Mount–rw–o remount/file to read and write


Restart

Enter reboot after reboot with new password


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.