How To Change Ubuntu Administrator And Root User Password

There are two important user account in ubuntu linux, one is administrator the other is root. We usually use administrator user account to remote login to ubuntu linux server ( $ ssh [email protected] ) then change to root user account to do root user tasks. But if your ubuntu linux server is created by a VPS provider, you had better change the default password for these two user account, this article will tell you how to do it.

1. Change Ubuntu Linux Administrator User Password.

  1. Login to the ubuntu linux server with administrator user use ssh command like below.
    $ ssh [email protected]
    [email protected]'s password: 
    [email protected]:~$
  2. Run passwd command to change administrator‘s password.
    $ passwd
    Changing password for administrator.
    (current) UNIX password: 
    Enter new UNIX password: 
    Retype new UNIX password: 
    passwd: password updated successfully

2. Change Ubuntu Linux Root User Password.

  1. Login to ubuntu linux server with administrator user account.
    $ ssh [email protected] 
    [email protected]'s password: 
    [email protected]:~$
  2. Run sudo -i command to change current user to root user.
    $ sudo -i
    [sudo] password for administrator:
    [email protected]:~#
    
  3. Run passwd command to change root user’s password.
    # passwd
    Enter new UNIX password: 
    Retype new UNIX password: 
    passwd: password updated successfully
    
  4. Run exit command to return to administrator user account.
    # exit
    logout
  5. Run exit command again to close the ssh connection.
    $ exit
    logout
0 0 vote
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x