Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Thanks for that, but if i have 300 users in company , i cant do this for every user.
What i am looking for is a policy file somewhere in pam.d , which is universily defined for every user ( that they have to change password every 3 - 4 months )
He probably should update login.defs for new accounts, but - from the manpages for login.defs(5):
Quote:
PASS_MAX_DAYS, PASS_MIN_DAYS and PASS_WARN_AGE are only used at the
time of account creation. Any changes to these settings won’t affect
existing accounts.
---
Quote:
Originally Posted by varunkant
Thanks for that, but if i have 300 users in company , i cant do this for every user.
Sure you can.
%awk -F: '{print $1}' /etc/passwd > accounts-file
Hand-edit accounts-file to remove system accounts and any other exceptions - e.g. root (do not forget this step). Set up a for loop to iterate through all accounts in accounts-file and update their expirations via chage.
He probably should update login.defs for new accounts, but - from the manpages for login.defs(5):
Quote:
PASS_MAX_DAYS, PASS_MIN_DAYS and PASS_WARN_AGE are only used at the
time of account creation. Any changes to these settings won’t affect
existing accounts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.