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.
- Login to the ubuntu linux server with administrator user use ssh command like below.
$ ssh [email protected] [email protected]'s password: administrator@:~$
- 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.
- Login to ubuntu linux server with administrator user account.
$ ssh [email protected] [email protected]'s password: administrator@:~$
- Run sudo -i command to change current user to root user.
$ sudo -i [sudo] password for administrator: root@DEV2QA:~#
- Run passwd command to change root user’s password.
# passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
- Run exit command to return to administrator user account.
# exit logout
- Run exit command again to close the ssh connection.
$ exit logout