Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

CentOS 5.x

I have an old user account that had a password policy in effect that expired.

[foo@foobox ~]# chage -l foouser
Minimum:        0
Maximum:        90
Warning:        5
Inactive:       5
Last Change:            Jan 02, 2012
Password Expires:       Apr 02, 2012
Password Inactive:      Apr 07, 2012
Account Expires:        Never

I wanted to change the password to never expire (the system is internal only and the account itself has very limited privileges).

I thought that running [foo@foobox ~]# chage -M 0 foouser would do this... When I check chage output it looks fine:

[foo@foobox ~]# chage -l foouser
Minimum:        0
Maximum:        0
Warning:        5
Inactive:       5
Last Change:            Jan 02, 2012
Password Expires:       Never
Password Inactive:      Never
Account Expires:        Never

After doing this though, I still wasn't able to login as foouser using the same password.

To get this working again, I needed to follow-up with passwd foouser and set the same password again.

My question is: why did I have to run passwd? Does the prior expired password not reinstate when I set password expiration to never?

share|improve this question
up vote 2 down vote accepted

The password expiration setting only affects the future, it cannot change the past. Once a password has expired, it has expired. You can't change the fact that this has already happened.

share|improve this answer
Thanks. That's exactly what I needed to know. – Mike B Jul 24 '12 at 19:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.