PASSWD is the command used in Linux for Changing users passwords.
Here at LinuxAPT, we shall look into the usage of PASSWD command in Linux.
The PASSWD command is mainly used for changing a Linux system’s password and setting the expiration time for a particular password, deleting the password of a user account, making a user account inactive after its password expiration, etc.
To know about all the options that you can use with the PASSWD command in Linux, you can run the following command:
$ passwd --help
This command will display all the different options that can be used with the PASSWD command in Linux.
If you intend to change the password of the currently logged-in Linux user account, then you will have to run the PASSWD command with the below command:
$ passwd
If you want to change the password of a user account other than the currently logged-in Linux user, then the process of doing so is slightly different from the one shared above.
To begin, you need to run the PASSWD command with sudo privileges followed by the username of the target user account:
$ sudo passwd system2
This article covers an overview of how to use the PASSWD command in Linux. In fact, The passwd command modifies passwords for user accounts and manages the password validity period.
passwd general command is:
$ passwd
The terminal prints out what user you are changing the password for. Type your current password, and then define and confirm your new password.