How to solve the root user password error in linux
Today, what I want to share with you is how to solve the root user password error in linux. I believe many people don't know much about it. In order to make you understand better, I summed up the following contents and looked down together. I'm sure you'll get something.
Question:
Enter the command su root, but enter the password incorrectly.
Reason:
Because the newly installed Linux system does not set a password for root.
Solution:
First enter the following command:
Sudo passwd root
[sudo] password for sam (user name): enter the password of the current login liunx user name
Enter new UNIX password: enter the new password and confirm that the password at this time is the new root password
Retype new UNIX password: reconfirm the new root password
Pop-up: passwd: password updated successfully (password updated successfully)
Then enter the root permission, as follows:
Su root
Switch to an ordinary user, such as the user name configured by yourself is sam.
Su sam
This is the end of how to solve the root user password error in linux. I hope the above content can be used as a reference for everyone. If you like this article, you might as well share it for more people to see.