,

how change user password in Linux with proper example

Posted by


To change your password in Linux, you can use the passwd command.

Here are the steps on how to change your password in Linux:

  1. Open a terminal window.
  2. Type the following command:
passwd
  1. The command will prompt you to enter your current password.
  2. Enter your current password and press Enter.
  3. The command will then prompt you to enter your new password.
  4. Enter your new password and press Enter.
  5. The command will then prompt you to enter your new password again to confirm.
  6. Enter your new password again and press Enter.
  7. The command will change your password.

Here is an example of how to change your password in Linux:

[user@localhost ~]$ passwd
Changing password for user user.
Enter old password:
Enter new password:
Retype new password:
passwd: password updated successfully

To change another user’s password in Linux, you can use the following command:

sudo passwd username

Here is an example of how to change another user’s password in Linux:

[user@localhost ~]$ sudo passwd abhi
Changing password for user abhi.
Enter the new password for abhi:
Retype the new password for abhi:
passwd: password updated successfully
0 0 votes
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback

[…] how change user password in Linux with proper example […]

1
0
Would love your thoughts, please comment.x
()
x