Centos7 su: identification of fault problems and solutions

Problem Description:

Today I reopened the Centos 7 virtual machine and found that I could not enter the root user. Report an error directly:
Insert picture description here


Resolution process:

I searched on Baidu and found that someone on the Internet said that the password was not set during the installation, but the last time I used it there was no problem. I also tried the above method: sudo su
Insert picture description here
this is a headache, I restarted and changed Another non-administrator account, the result is still the same, I saw another article saying use sudo -i: the
Insert picture description here
result is still the same.
This seems to be the reason for the password. I remember that I used xshell last time, and I tried it with the xshell connection. The root account login is no problem. I changed the password there: sudo passwd rootAfter finishing, I re-enter the virtual machine and the login is successful! NICE

Guess you like

Origin blog.csdn.net/weixin_45936162/article/details/112764378