Linux/Unix:How To Change User Password

In Unix or Linux system,  you need to use “passwd” command to change or set user’s password, when you update or set password, it will update shadow file. In this post I will show you on how to set or change linux use password:

Syntax

passwd [options]

If you login the system with normal user, then you just only can change the password for his or her own password, it login in the system with root user, then it can change any user’s password.

Change Normal User Password

issue the following command:

$passwd

Changing password for vivek

(current) UNIX password:

Enter new UNIX password:

Retype new UNIX password:

passwd: password updated successfull

Change other user's password

Firstly you must login the system with root user, then run “passwd” pass user name you want to change password, such as, change “test” user’s password, issue the following command:

#passwd test

Enter new UNIX password:

Retype new UNIX password:

passwd: password updated successfully

 

You might also like:

Sidebar



back to top