I'd like to change the password of another user, as root, but don't want the user to be prompted to change their password when the log in. As far as I can tell, any mechanism to change the password as root set the ADMCHG flag in /etc/security/passwd
Asked
Active
Viewed 6.0k times
7
Ryan Emerle
- 173
4 Answers
6
Use
passwdto change the user's password:passwd $userUse
pwdadmcommand to cancel the password-change prompt:pwdadm -c $user
That's it! :)
-1
Do you need to do it in an automated way? If it's a one-off then change it to a temp password, then login as that user and change it to the desired password.
pgs
- 3,661