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 administrator@111.111.111.111 ) 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 administrator@111.111.111.111
    administrator@111.111.111.111's password: 
    administrator@:~$
  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 administrator@111.111.111.111 
    administrator@111.111.111.111's password: 
    administrator@:~$
  2. Run sudo -i command to change current user to root user.
    $ sudo -i
    [sudo] password for administrator:
    root@DEV2QA:~#
    
  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

Leave a Comment

Your email address will not be published. Required fields are marked *

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