Home  >  Article  >  Operation and Maintenance  >  How to solve the problem that root user cannot log in in CentOS system

How to solve the problem that root user cannot log in in CentOS system

angryTom
angryTomOriginal
2020-03-20 15:23:067051browse

How to solve the problem that root user cannot log in in CentOS system

How to solve the problem that the root user cannot log in in the CentOS system

The solution is as follows:

1. First log in as an ordinary user

2. Then switch to the root user, the command is as follows

sudo su

3. After switching, you will have root permissions, and then use the command passwd to change the password of the root user

4. This Enter the new password twice, log out of the current user and then log in again as the root user.

This article comes from the PHP Chinese website, CentOS usage tutorial column, please pay attention to this column for more related tutorials!

The above is the detailed content of How to solve the problem that root user cannot log in in CentOS 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