Ubuntu su password setting

1. The default root password of Ubuntu is random, that is, there is a new root password every time you boot. We can enter the command sudo passwd in the terminal, then enter the password of the current user, enter,

2. The terminal will prompt us to enter a new password and confirm it. The password at this time is the new root password. After the modification is successful, enter the command su root, and then enter the new password and it will be ok. 

3. There is no default for analysis, because you have not set a password for root, the first user is in the admin group, so he can set a password for root, so sudo passwd root [sudo] password for you: ---> Enter you password will not be displayed 

Enter new UNIX password: 

--- > Set root password Retype new UNIX password: 

--> Repeat =============================================== =============================

After logging in with the user created during installation, execute sudo passwd root in the Shell and press Enter Password:

Then enter the newly created user password and press Enter new UNIX password:

At this time, enter the root password to be set twice and you will see 

password updated successfully了!=========================================================================

After installation, you can go to the user and group to change it, and you can change it casually. If you want to use root when logging in, you can change it in the "login interface" and let the administrator log in to the system.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326222942&siteId=291194637