Sep
16

Linux: How to Force Users to Change Password at First Login

Author Rai    Category Linux     Tags

So,how do you, as a Linux System Administrator, force system users to change their passwords at first or next login? Very simple:

Using chage command:

If the password is already set, execute this command to expire the user account:

chage -d 0 user1

On the user’s next login, password change will be enforced.

Very simple.

Related Posts

  • Most Popular Posts

3 Comments to “Linux: How to Force Users to Change Password at First Login”

  • toff September 17, 2009 at 6:19 pm

    unfortunatly , it doesn’t work with ldap+gdm session
    I mean like MS domain session opening with passord changing forced

  • Bhupsa October 14, 2009 at 3:43 pm

    # passwd -f

  • pete January 10, 2012 at 5:16 am

    > If the password is already set,

    yeah, but what about if the password is *not* already set, as when creating a new account? you covered “next” login, but not “first” login.

    thanks anyway. 8-P

Post comment

CommentLuv Enabled

Powered by 1and1.comGlobat Webhosting Earn with Your BlogAdvertise @ PinoyTux

Search PinoyTux

Subscribe to Email Feeds

Enter Email Address:

Blog Lounge

Popular Posts

Recent Posts

Drop your Card Here

Recent Comments

Site Stats