5

With chage command we can change password expiry information for a user. Is there anyway to enforce password aging for a group of users?

2

I think this might help. You can set default password expiry using the file /etc/login.defs.

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo nano /etc/login.defs

For example, you can setup values as shown below:

PASS_MAX_DAYS 30
PASS_MIN_DAYS 1
PASS_WARN_AGE 7

Once done, just close and save the file.

For more info see login.defs manpage.

  • Nice. Did not know of this. Is it possible to apply to certain groups only? – don.joey Apr 23 '14 at 12:31

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.