The Linux command -p is used to specify the password for a user. This command is used to set a password for a user account, allowing the user to access the system with the specified password. It is important to note that the password should be kept secure and should not be shared with anyone else. The -p command is a powerful tool that can be used to protect the user’s data and system from unauthorized access.
To specify a password for the user “john”
$ passwd john -p
The command to specify the password for a user in Linux is
passwd. This command is used to change the user’s password and can be used to set a new password for the user. To use the command, open a terminal window and type
passwd followed by the username of the user whose password you want to change. You will then be prompted to enter and confirm the new password. Once the password is set, the user will be able to log in with the new password.