Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the root user password error in linux

Shulou Source: shulou.com Published: 2022-06-03 06:41:32 09月21日 Update

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.

Tags: Password user input error content command user name new secret ordinary success put what you have learned into practice value again reason that is article method more permissions see Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Huawei Shulou Technology vpn NVidia