How do I forget the Linux Root Account Password?

Source: Internet
Author: User

I have found a lot of solutions on the Internet to forget the password, but since I just got started, many of them are not very familiar with it, and some of them on the internet say too much about it, next, I had to read more books and find the answer. Now I can summarize the details as follows:

I will discuss how to use this method when logging on to the Linux system as a common user without knowing the password of the root account. If VI is used, you can easily enter VI/etc/passwd in the command line of the terminal logged on with a common account to open the file for saving the password, in the/etc/passwd file: the logon items in the password file are composed of seven fields separated by colons: Login Name, encrypted password, digital user ID, numeric group ID, comment field, start directory (/home/Steven S) and ShellProgram(/Bin/KSh ).

The above fields correspond to the following line in passwd:

Root: X: 0: 0: Root:/root:/bin/bash X is the encrypted password. If you delete this X root account, there will be no password, which is exactly the same: root: X: 0: 0: Root:/root: /bin/Bash: Save it again. For system security, please log on to the root account with or without a password and use the passwd command to set the 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.