Forget the ubuntu login password

Source: Internet
Author: User
Forget the ubuntu login password. it's not a good thing. just forget the password. The system version here is 1204LTS. Restart the machine. during the startup process, press Esc (the graphical interface of the ubuntu task manager was automatically called up by shift + Esc. Thatisamazi forgot the ubuntu login password. well, it's not a good thing, just forget the password. The system version is 12.04 LTS. Restart the machine. during the startup process, press Esc (the graphical interface of the ubuntu task manager is called up by pressing shift + Esc, That is amazing) and you will see the startup options, move the focus to the Recover mode option, and then press e to edit it. In this way, you can edit the startup script, move to the last line, enter rw init =/bin/bash, and press enter. Press F10 to start the computer. In this way, you will see a recover menu option interface, select the "root drop to a root shell prompt" option, and then press Enter. At this time, a command prompt cursor is displayed on the screen. you can enter any command here, including changing the password. However, if passwd <用户名> The system prompts "authorization token manipulation error ". I searched the internet for the reason that when the above recovery mode directly enters the root, the entire file system will be read-only mounted (dropping into a root shell from the boot loader. turned out the filesystem was mounted read only ). Because changing the password is actually a shadow file on the system, an error occurs. The solution is to use "mount-o remount, rw/" to remount, so that passwd can be used to change the password. After the modification, restart the machine and log on again. Note: By default, the ubuntu system does not enable root, and the root account does not have a fixed password, and the password changes over time. If the passwd root command is used to set a password for the root user, the root account is enabled. In fact, this doesn't make much sense, because when you need the root permission, you can use sudo (and if you set the root password in this way, in the above method, when the dropping into a root shell from the boot loader is started, the system will require a root password ). Of course, you can also disable (lock) "sudo passwd-l root" and unlock (unlock) "sudo passwd-u root" when using it ".
Related Article

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.