Forget the Linux login password, root is not the previous 123456, change the root password login

Source: Internet
Author: User

Mine is CentOS 7 running under VMware.

When entering

Press e-and then scroll through the list to find the Ro (next to root), replace it with RW, space and add init=/sysroot/bin/sh,

Then press Ctrl+x to enter into single user mode, in this mode, you can change the password

Run Chroot/sysroot First
:/#chroot/sysroot

Last run passwd ROOT to set a new password
:/#passwd Root

Run touch/.autorelabel to update selinux parameters after setting the password

After that, direct VMware restarts the client and reboots.

And then log in just fine.

Forget the Linux login password, root is not the previous 123456, change the root password login

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.