I'd like to set up an account on a linux server and make the account's password never expire. I'm having difficulties figuring it out with the passwd man page. Could someone please help me out?

link|improve this question

feedback

4 Answers

up vote 4 down vote accepted

To maximize password expiration:

passwd -x 99999 username

To disable account expiration:

usermod -e '' username

To do both with chage:

chage -E -1 -M -1 username

To set the system defaults, look at /etc/default/useradd

link|improve this answer
feedback

You want the chage command you just set the account minimum password to a rediculously long time like 9999999999 days.

here is a very good howto - http://www.cyberciti.biz/tips/setting-off-password-aging-expiration.html

link|improve this answer
feedback

Use chage command:

chage -M -1 USERNAME
link|improve this answer
feedback

The complete command to mitigate any other previous configurations is the following:

chage -E -1 -M -1 -I -1 username

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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