linux poison RSS
linux poison Email

Turn OFF password expiration / aging

etc/shadow stores actual password in encrypted format for user’s account with additional properties related to user password.

The password expiration information for a user is contained in the last 6 fields. Password expiration for a select user can be disabled by editing the /etc/shadow file

You can also use chage command. The chage command changes the number of days between password changes and the date of the last password change. This information is used by the system to determine when a user must change his/her password.

To list current aging type chage command as follows:
# chage -l nikesh
Output:

Last password change : May 12, 2008
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7

To disable password aging / expiration for user foo, type command as follows and set:
Minimum Password Age to 0
Maximum Password Age to 99999
Password Inactive to -1
Account Expiration Date to -1

Interactive mode command:
# chage username
OR
# chage -I -1 -m 0 -M 99999 -E -1 username


1 comments:

Anonymous said...

detailed explanation of Linux chage command along with examples.

http://www.thegeekscope.com/linux-chage-command-to-change-user-expiry-information/

Post a Comment

Related Posts with Thumbnails