Reset 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.
- Change Your User Account Password
- Change Another User Account Password
- Command To Force Change Password At Next Login
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:
Open the Terminal, Enter the above command to reset your Account Password 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.
For example, here we use the passwd command to change other users “tecrobust” account password, use the following command:
Open the Terminal, paste the above command to reset another user account password as shown in the below image.
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,
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,
Once the user sets the new password, the user will able to login into your Linux PC.
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.
For more article, Kindly Visit our HomePage