Home  >  Article  >  Operation and Maintenance  >  How to change root password in linux system

How to change root password in linux system

清浅
清浅Original
2019-04-13 13:45:23131149browse

The methods for changing the root password in Linux are: 1. When the user has sudo permissions, the password can be changed directly; 2. When the user does not have permissions, long press the Shift key to enter Ubuntu Advanced in GRUB map mode. options to configure.

How to change root password in linux system

[Recommended course: Linux Tutorial]

The methods for changing the root password in Linux are:

The first one: the current user has sudo permissions

When the user has sudo permission, you can directly change the password as follows:

sudo su root    
#passwd

How to change root password in linux system

Use the command: sudo passwd root

How to change root password in linux system

Second type: When the user does not have sudo permissions

Restart the lunix system, long press the Shift key during startup to enter the GRUB map mode

How to change root password in linux system

Select Ubuntu advanced options, press Enter to enter the environment

How to change root password in linux system

and then press the e key to enter recovery mode. Enter the startup parameters. Press down to page to see the recovery nomodeset on the fourth line from the bottom. Delete it.

How to change root password in linux system

Then add quiet splash rw init=/bin/bash in the deleted place and then press F10 to start

How to change root password in linux system

After correct configuration, the system will directly enter root mode after running. Enter: passwd. The system will prompt you to enter a new password

How to change root password in linux system

Note: If the following error occurs, follow the prompts. Just install it correctly

How to change root password in linux system

#Summary: The above is the entire content of this article, I hope it will be helpful to everyone.

The above is the detailed content of How to change root password in linux system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn