How do I set up password expiration policies for user accounts in Linux? Is it vastly different on each distribution?
In particular I use some Debian/Ubuntu servers, but links to appropriate info for other distros is obviously welcome.
[couldn't find a duplicate Q, but let me know]
I posted slightly quickly, it looks like both passwd and chage will work for what you would like to accomplish:
sudo chage [username] will interactively allow you to set things. Otherwise here is the help output of chage and passwd.
chage --help output: chage --help Usage: chage [options] [LOGIN]
Output from command passwd --help -
You can set up expiration policies in /etc/login.defs - specifically PASS_MAX_DAYS=, PASS_MIN_DAYS= and PASS_WARN_AGE=
Also you need to edit /etc/default/useradd - INACTIVE= and EXPIRE=
It's not exactly the same situation, but there is more info here: Expiring Inactive User Accounts