How to modify Linux forgot login/root password

Source: Internet
Author: User

Because a friend's Linux password forgot, let me help to fix,
After the feeling, this method may still be used later,
Summarize the record and make it easy to use later.

The Linux version is: Ubuntu 14.04

The first step is booting to grub

The second step into Ubuntu advanced settings is as follows

Step three to Recovery mode recovery Model (note that this step is to press e instead of carriage return)

This is a post-entry effect.

Fourth step to find RO recovery mode to modify it to be RW single Init=/bin/bash

And then Ctrl+x will be able to enter

Some of the interfaces are as follows:

Under this interface you use passwd "root"
The root password can be modified

If the machine is multi-user, you forget that you want to modify the user's user name,
You can use this command to find: Cat/etc/shadow
This command can find the user name,
You can then continue to modify it with passwd.

Normal does not forget the root user password, can be changed under the root user,
Forget the root password, forget login password can use this way.

How to modify Linux forgot login/root 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.