Both Linux and UNIX-like operating systems use the passwd command to change user password. The passwd is used to update a user’s authentication token (password) stored in /etc/shadow file. The passwd change passwords for user and group accounts.Open Linux terminal or connect to your server using PuTTY.Type passwd and press Enter.Type your current password and press Enter.Now type your new password and press Enter.Make sure your password is complex and not similar to older one otherwise you will get BAD PASSWORD error as shown in below screenshot.Retype your new password and press Enter.Now you will get notify that your password has been changed.If you’re logged in as root say on a CentOS, Fedora or Red Hat Enterprise Linux server’s virtual terminal, then you can change the password simply by typing passwd and then pushing enter. You’ll receive a prompt that reads “Enter new UNIX password:” and then you’ll be asked to type it a second time.Linux changing user password using passwd. Linux Change Group Password. When the -g option is used, the password for the named group is changed. In this example, change password for group sales: # passwd -g sales The current group password is not prompted for. The -r option is used with the -g option to remove the current password from the
How to update or change user's password using passwd in Linux?
The passwd command line utility is used to update or change user’s password. The encrypted password is stored in /etc/shadow file and account information is in /etc/passwd file. To see all user account try grep command or cat command as follows:
How do I reset a user's password in Linux?
A. To reset a user’s password, use passwd command. You have to change it to a different password. Type a new password twice. Previous FAQ: How Do I Find Out Linux System Memory Utilization?
How do I change the root password in Linux terminal?
To change or set a new root (superuser) password type: $ sudo passwd. Forcing Linux user to change password at their next login. By default, Linux passwords never expire for users. However, we can force users to change their password the next time they log in via GUI or CLI methods. The syntax is straightforward: $ sudo passwd -e {username}
How do I change the password of a group in Linux?
The -r option is used with the -g option to remove the current password from the named group. This allows group access to all members. The -R option is used with the -g option to restrict the named group for all users. As a Linux system administrator (sysadmin) you can change password for any users on your server.

Below are two helpful articles on a similar topic 👇
Is WSL2 available with Windows 10?Is root password required to login?