Thursday, March 5, 2009

Force users to change their passwords upon first login

Taken from Redhat Magazine: Tips and tricks: How do I force users to change their passwords upon first login?

  1. Firstly, lock the account to prevent the user from using the login until the change has been made:

    # usermod -L
  2. Change the password expiration date to 0 to ensure the user changes the password during the next login:

    # chage -d 0

  3. To unlock the account after the change do the following:

    # usermod -U

No comments: