A user calls you and asks to reset his password, you confirm that it is actually the user on the phone, and he says his username is bobsmith, you are in a Linux environment. What is the appropriate command for resetting his password?
sudo pwd bobsmith [password]
Correct Incorrect Unanswered Report Issue Answer Description
"sudo passwd bobsmith" will run the passwd utility as a super user and will prompt you to enter a new password for bobsmith. "chown" is used to change file ownership, the syntax provided is also incorrect. "su bobsmith" will allow you to run commands as bobsmith. The "pwd" command shows your Present Working Directory, it has nothing to do with passwords.
Wikipedia
passwd is a command on Unix, Plan 9, Inferno, and most Unix-like operating systems used to change a user's password. The password entered by the user is run through a key derivation function to create a hashed version of the new password, which is saved. Only the hashed version is stored; the entered password is not saved for security reasons.
When the user logs on, the password entered by the user during the log on process is run through the same key derivation function and the resulting hashed version is compared with the saved version. If the hashes are identical, the entered password is considered to be correct, and the user is authenticated. In theory, it is possible for two different passwords to produce the same hash. However, cryptographic hash functions are designed in such a way that finding any password that produces the same hash is very difficult and practically infeasible, so if the produced hash matches the stored one, the user can be authenticated.
The passwd command may be used to change passwords for local accounts, and on most systems, can also be used to change passwords managed in a distributed authentication mechanism such as NIS, Kerberos, or LDAP.
Passwd - Wikipedia, the free encyclopedia Subscribe to avoid duplicate questions and track your progress over time