Linux Change Password

Basic Linux Command Example: 

 

Linux Change Password.

 

   The Linux change password command example below show how to change password for user, change root password the password for root user and change password for other user in the system.  In order to change password on Linux system, the Linux change password example below use the passwd command.

 

Change Password

 

If you log on into Linux system, and you want to change password ( your own user password)... just issue password command as show on example below.

Linux Change Password

[linux@fedora11 ~]$ passwd

Changing password for user linux.

Changing password for linux.

(current) UNIX password:   <-- type in your current password and hit 'Enter' key

New password:   <-- type in new password and hit 'Enter' key

Retype new password:   <-- Re type new password and hit 'Enter' key

passwd: all authentication tokens updated successfully.

[linux@fedora11 ~]$

 

Change root password.

 

To change root password on Linux system... you may need to log in as root user or use su command to be root user.  Only root user can change password for root user... so the example below show that we use su command to be as root user then issue the root password to change root user password on the system.

Change root password

[linux@fedora11 ~]$ su -

Password:   <-- type in root user password and hit 'Enter' key

[root@fedora11 ~]# passwd

Changing password for user root.

New password:   <-- type in new root password and hit 'Enter' key

Retype new password:   <-- Re type new root password and hit 'Enter' key

passwd: all authentication tokens updated successfully.

[root@fedora11 ~]#

 

Change other user password.

 

To enable you to change other user password on Linux system... you must have the root user privileges... so you got to be root user to enable you to reset or change other user password.  The example below show step by step to change other user password on Linux system.

Change other user password

[linux@fedora11 ~]$ su -

Password:   <-- type in root user password and hit 'Enter' key

[root@fedora11 ~]# passwd james   <-- type in username of user that we want to change the password for and hit 'Enter' key

Changing password for user james.

New password:   <-- type in new password and hit 'Enter' key

Retype new password: <-- Re type new password and hit 'Enter' key

passwd: all authentication tokens updated successfully.

[root@fedora11 ~]#

 

Keywords: linux change password, change password, change root password, change other user password, change user password, change password linux