In order to change root’s password on Linux system, simply use the passwd command via a SSH client such as Putty. Below is an example:
[root@localhost ~]# passwd Changing password for user root. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. [root@localhost ~]#
It will prompt to type new root password and then confirm the root password.
The passwd can be used to change password of a particular user as below:
[root@localhost ~]# passwd username