in

LinuxLinux

Change & Reset User Password In Linux!

Change User Password Linux

R

eset User Password: In Linux, Password is the authenticating method to execute any essential process. Linux will ask you the password if you trying to install or uninstall any program from your Linux PC. As a user, you can change your password, If you want to change your system password you just need to use the passwd command in the Terminal. As a user, you cannot change the password of your Admin’s account. Your user id must be included in the sudoers file to change the password of Admin’s account. Follow the below steps to learn reset or change the password of a user account, reset or change the password of Admin account.

Jump To:

Change Your User Account Password:

It is very easy to change your user account password, Use the passwd command to reset or change your password. Follow the below command:

$passwd

Open the Terminal, Enter the above command to reset your Account Password in Linux.

passwd Command in Linux
passwd Command in Linux

You will be prompted to enter your old password, then enter the new password and retype the new password. Once you enter the passphrase, The Password of your user account will be changed instantly.

You need to enter the new password on next time login to your system.

Change Another User Account Password:

To do this, your user account must be in the list of the sudoers file. Only root users will able to change another user account’s password in Linux. To do this, you need the passwd command to change another user account password.

Check this too  Whereis Command in Linux: Syntax, Commands & Examples.

For example, here we use the passwd command to change other users “tecrobust” account password, use the following command:

$sudo passwd tecrobust

Open the Terminal, paste the above command to reset another user account password as shown in the below image.

Sudo Passwd tecrobust
Sudo Passwd tecrobust

You will be prompted to enter the old password. Once you entered the old one, you need to enter the new password and retype the new password to confirm the changes.

Command To Force Change Password At Next Login:

If you want to force a user to change the password at next login in Linux, Then you can use the following command,

$sudo passwd --expire tecrobust

The –expire is mainly used to expire the current password and it will prompt you to enter the new password at next login.

If the user tried to login next time to your pc or server, the following output will appear on your screen,

Output
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for tecrobust.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Connection to ubuntu-tecrobust closed.

Once the user sets the new password, the user will able to login into your Linux PC.

Verdict:

That’s it. In this article, we discussed the multiple ways to change user account password & change another user account password. If you have any queries and then feel free to comment us below.

Article Review
  • Content Explanation
  • Commands Working
  • Images Explanation
4.7

Summary

For more article, Kindly Visit our HomePage

Leave a Reply

Your email address will not be published. Required fields are marked *

Written by Julian

Hello Folks! I'm Julian, Promoted to the Content writer for the category of Commands & Web Apps in Tec Robust. Enjoy my content & Learn more Linux Commands!

Contact me:
tecrobust [@] gmail.com
Sub: Message to Julian

Kill A File In Linux

How To Kill A Process In Linux {Ubuntu, Cent OS} Debian & Non-Debian Linux

Eclipse Ubuntu: How To Install Eclipse for Ubuntu 18.04 LTS and 19.04