How do I inactivate an account after 14 days without changing a password?

R

red

Guest
I am trying to test some new user policies and I would like test this. I just need to know how to set it up so that after 14 days go by without changing your password, your account is permanently disabled.

This change would apply to all current and new users.
 


that's for expiring an account after a certain date. I want to set up a new policy that expires accounts that haven't changed their password 14 days after they're supposed to.
 
useradd -f

or...

check /etc/shadow and on the 3rd field, there's a day count of how many days since Jan. 1, 1970 has come as of today. You can do a bit of math and check the dates the user has registered in a manner to minus it from Jan. 1, 1970. Then add 14 and if the 2nd field hasn't changed, then you could use an if in a cron script.
 
Just curious. What's the objective of doing this? Wouldn't this shut out a lot of users?
 
Just curious. What's the objective of doing this? Wouldn't this shut out a lot of users?

the command I was looking for was chage -I

The reason for this is that if an account is inactive for that amount of time, without me being notified as to why they're gong that long, I think there's something wrong and I do not want them having access to my systems.
 

Staff online

Members online


Top