Change the root password on the command line

As root is an important user, you cannot change the root password using the Web Administration Interface. To change the root password, log in to the appliance over SSH. As a security precaution, the root user is not able to log in to the appliance through SSH directly. First you must log in as an administrator user, then execute the command su - to switch to the root user. For example:

$ ssh admin@appliance
admin@appliance's password:
Last login: Thu Feb 16 10:26:12 2012 from
[admin@appliance ~]$ su -
[root@appliance ~]

Enter the passwd command to change the root password:

[11:45:02]# passwd
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@appliance ~]
Note   On the AMI appliance, you must have a private key to log in over SSH. For more details, see Connect to AMI over SSH.

Related Links