{ 8 comments… read them below or add one }

1 Cyril September 11, 2008 at 10:47 am

Very useful tip!
I’ll use it.


2 Grobsch September 11, 2008 at 6:36 pm

Excellent tip for livecds… Thanks!!


3 Freddy February 20, 2009 at 12:12 pm

Great …….. Very Useful


4 RRRolle July 9, 2010 at 6:31 am

Task: Use chage command to force users to chage their password upon first login

Use the following syntax:
chage -d 0 {user-name}
# chage -d 0 tom

Hello out there! Must be something wrong with the spelling (chage)??


5 Joey October 26, 2010 at 5:39 pm

RRRolle, there is nothing wrong with the spelling. ‘chage’ is correct. You are changing the aging attributes of the account — when the password expires, how long between required password changes, etc. chage -l will give this information:

# chage -l nagios
Last password change : Sep 17, 2010
Password expires : Nov 16, 2010
Password inactive : never
Account expires : never
Minimum number of days between password change : 1
Maximum number of days between password change : 60
Number of days of warning before password expires : 7


6 Senmic August 21, 2012 at 9:13 am

I am a new Linux user and I created users and set their password to expire and force them to change password on their first log in, I tried on one user ,it prompted me to enter current password and when i typed current password the screen usually sleeps. Can anyone advise?


7 john October 25, 2013 at 7:21 am

very useful tip, thanks alot


8 Benny Helms October 30, 2013 at 8:57 pm

One method that is easier than doing the math required by the above solutions is:
passwd -e username

This forces an immediate expiration, and forces a password change on the next login. I use it each time I create a user.

Hope this helps!


Leave a Comment

Tagged as: , , ,

Previous Faq:

Next Faq: