Monday, January 26, 2009

chage command

The chage command lets you specify an expiration limit for a users password. a user can be required to change his/her password evry month, every week or at a given date. once the password expires, the user is prompted to enter a new one.you can issue a warning beforehand, telling the user how much time is left before the password expires.


If you want to close an account, you can permanently expire a password. You can even shut down accounts that are inactive for too long. The -M option with the number of days sets the maximum time that a password can be valid. In the next example, the password for the chris account will stay valid for seven days:
chage -M 7 chris
To set a particular date for the account to expire, use the -E option with the date
specified mm/dd/yyyy:
chage -E 07/30/2008 chris

To find out the current expiration settings for a given account, use the -l option:
chage -l chris
You can also combine your options into one command, like so:

chage -M 7 -E 07/30/2008 chris


No comments:

Post a Comment