[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

hi, Can any one help me out in understanding the "min" field in /etc/shadow

Hi All,

Can any one help me out in understanding the "min" field in /etc/shadow. what does it mean. I did man on shadow it gave

" min   The minimum number of days required between pass- word changes ", I didnt get it.

can you explain me, i would appreciate.

1 Solution
I've not actually used it but its purpose is to stop users from changing their password too often.

If you set it for 5 days and the user trys to change their password after 3 days, it should not allow them.

I say "should" because I've never actually seen it work, since there seems to be no reason to stop a user from changing their password on a time basis.

max and warn are the fields most often used, since they make a user change their password.

Any expert out there have a real world example of why you would use min?
The main use is when you have password expiry set.  If you have no min days set, when the password expires, the user can set their new password and immediately set it back to their original password, making the expiry pretty useless.  
The format of the /etc/shadow file is:

    min - Contains the minimum number of days required between password changes
     max - Contains the maximum number of days the password is valid before the user is prompted to specify a new password.

     please read this doc for more details:

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now