How do I use the command passwd to set a password for user the user01?
Solution 1:
Using
apropos password
provides an overview on possible command involving password.
In the list, you find:
passwd (1) - change user password
This learns you that the command passwd
can be used to change a password of a user.
Now,
man passwd
will show you the documentation ("man page") for that command, where you can learn how to change the password of user user01
to 123xyz
.
Note that you must have administrator (aka "root") privileges to change another user's password. Thus, you will need to precede the passwd
command with sudo
in order to execute it with root privileges.