In this article, we will see how to set or change Linux User Password. We can set the password for new and change password for existing user using Linux passwd command. Passwords do not display to the screen when you enter them.
Linux system administrator (sysadmin) you can change password for any users on Linux server.
How to set password for Linux user
By default, when we create user in Linux with useradd, its doesnt have any password. We have to set password.
Create User
useradd martin
Now set password for the user martin.
passwd martin
How to change password for Linux user
In this we are going to change password existing user.
passwd varshi
root@mongodb1:/home/r2schools# passwd varshi New password: Retype new password: passwd: password updated successfully root@mongodb1:/home/r2schools#