Modify the linux root Password

Source: Internet
Author: User
Since there are 6 running levels in linux, the single-user running level is-1, the running level is single-user mode. In this mode, you can change the root password. this mode has the following features: pass parameter 1 for the kernel or single can enter single-user mode.

Because there are 6 running levels in linux

The single-user running level is-1, which is the single-user running level.

You can change the root password in this mode.

This mode has the following features:

Passing parameter 1 or single for the kernel can enter single user mode'

Do not start any service in single-user mode

In single-user mode, the root user is logged on by default, and no password is required.

You can use passwd to change the root password.

The process is as follows:

First, restart the instance. you can press "e" to edit it when selecting a Linux boot guide.

Select the kernel line and enter edit. add 1 or single at the end and press B to enter single-user mode.

This completes the entry to the single-user mode.

In this way, you can change the password.

In this way, there is a restriction that anyone who has access to the computer can modify the root password after restarting.

Therefore, grub can be encrypted.

Add the following parameters to grub. conf to encrypt grub.

Passwd -- md5 & asdf234123qwer, which is not divided into encrypted passwords.

The encrypted password can be generated through the grub-md5-crypt

For security purposes, if you forget the root password and grub password, you will not be able to fix it. reinstall it, cool!

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.