is there any difference in the "Minimum number of days between password change" set to -1 and 0?

or maybe both commas does the same policy?

chage -m -1 user
chage -m 0 user

thank you for any hint, I can't find -1 descirbed in chage manual but it is possible to set it to -1

Minimum number of days between password change          : -1

If you take a look at the source for chage there's a comment that explains what -1 does:

 * new_fields - change the user's password aging information interactively.
 * prompt the user for all of the password age values. set the fields
 * from the user's response, or leave alone if nothing was entered. The
 * value (-1) is used to indicate the field should be removed if possible.
 * any other negative value is an error. very large positive values will
 * be handled elsewhere.

So when you specify chage -m -1 <user> it's disabling the mindays field. So disabling it with a -1 vs. setting it to 0 would appear to have the same effect, when it comes to restricting the how frequently a user can change their password.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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