Redhat - Change all existing users password expiry
Hi
I have an issue of needing to change the password expiry for all users on our server. Bar doing it one by one. Is there a way to change the expiry for all existing users? |
Quote:
Should be very simple to dump a list of users from the passwd file, and shove it through a bash script to change the expiry. But there isn't a way to do it for ALL users at once with one command. And have you called Red Hat support?? If you're using RHEL, you're PAYING for it, right??? |
Something on this line then use script to grab the users and issue the changes maybe??
https://access.redhat.com/documentat...swd-aging.html |
You can use this to get users of regular user ids listed in login.defs:
Code:
MIN=$(grep '^UID_MIN' /etc/login.defs) Code:
while read u; do |
Quote:
|
Assuming you're using local password policies, here are a few basic settings:
/etc/login.defs PASS_MAX_DAYS 60 PASS_MIN_DAYS 1 PASS_MIN_LEN 5 PASS_WARN_AGE 7 The above will assign any new users the following definitions and you can use szboardstretcher's script to assign the policies to each of the existing users. |
All times are GMT -5. The time now is 08:51 PM. |