Red Hat Linux Forget root password solution __linux

Source: Internet
Author: User

Today, there is a Red Hat server installation time too long, and the installer forgot the root password, only remember their username password (chenfeng/123), do?

Later, the data were finally resolved.

After the boot appears the System selection interface, in red Hat Linux option on the "E" key, or some single system machine is not the system to select the interface, it does not matter, skip the BIOS also non-stop press "E" key,

Next, there are three options, press "E" on "kernel/boot/vmlinuz-2.4.18-14 ro root=label=/" to edit,

Before "Ro" or "root" plus "single", and then enter return.
Press "B" key to start, enter the character interface, when "sh-2.05b#", means has entered Single-user mode, and notice you will find that Single-user mode is logged with root,

All right, now you're free to change your password.

Two ways:

1, directly modify the root password, input passwd root, repeat input two times you can reset the root password.

2, will you remember the normal user name to enhance the rights

Vim/etc/sudoers, open the file editor and add a line below the line root all= (All)

Chenfeng all= (All),!wq force save.

So even if you don't know the root password, the next time you log in with Chenfeng, you can use the Sudo-s command to enter your own password to elevate the normal permissions to root super Admin privileges.

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.