How Do I Give a User a Password in Linux?
Contents What Is the Command to Give a User a Password in Linux? Both Linux and Unix-Like Operating Systems Use the Passwd Command to Change User Password. …To...
Contents
What is the command to give a user a password in Linux?
Both Linux and UNIX-like operating systems use the passwd command to change user password.
…
To change a password on behalf of a user:
- First sign on or “su” or “sudo” to the “root” account on Linux, run: sudo -i.
- Then type, passwd tom to change a password for tom user.
- The system will prompt you to enter a password twice.
Must Read
How do I lock a user in Linux?
UNIX / Linux : How to lock or disable an user account
- Lock the password. To lock a users account use the command usermod -L or passwd -l. …
- Expire the user account. The commands passwd -l and usermod -L are ineffcient when it comes to disable/lock user accounts. …
- Changing the shell.