BVLog Bryan Voss’ mental synchronization point

14Sep/090

Linux force password change

I needed to have a user change their password on their next login, so I had to look up how to do that. Since I had to do a little more searching than usual to find an answer, I'm posting it here for posterity.

First, change the user's password to a temporary:
passwd [username]

Next, reset the password expiration to 90 days (-M) and set the last change date to 0 (-d) to force a change:
chage -M 90 -d 0 [username]

Finally, verify the info:
chage -l [username]

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.