LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-12-2005, 11:11 AM   #1
bspicer
LQ Newbie
 
Registered: Apr 2002
Posts: 26

Rep: Reputation: 15
Password Expiration Policy


I currently have about 60 users in RedHat and our passwords do not change at all. I would like to have unix make each user change their password every 90 days. I made this change in etc/login.defs but read that this only affects newly created accounts.

Is there away to globally set each account so their password expires in 90 days?

Thanks.

Bill
 
Old 04-12-2005, 11:16 AM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
I think you need to use passwd:

http://unixhelp.ed.ac.uk/CGI/man-cgi?passwd

if the user's account supports password lifetimes.
 
Old 04-12-2005, 11:31 AM   #3
bspicer
LQ Newbie
 
Registered: Apr 2002
Posts: 26

Original Poster
Rep: Reputation: 15
Forgive me I'm still a newbie.

Will passwd work with many users at once like passwd -x 90 *
or maybe pipe a list of users to it.

Also what do you mean by if users account supporst password lifetimes.
The password expiration check box is unchecked for each user in user manager.
thanks.
 
Old 04-12-2005, 11:49 AM   #4
bspicer
LQ Newbie
 
Registered: Apr 2002
Posts: 26

Original Poster
Rep: Reputation: 15
We also don't have any password routine in our .bash_profile. Not sure what we wold need in there.
 
Old 04-12-2005, 05:45 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
No, passwd won't accept multiple accounts (wildcards).

A work-around would be something like (untested)

Code:
awk -F: '{ if($3 >= 500) print $1}' /etc/passwd | xargs -i passwd -x 90 {}
And what do you mean with the .bash_profile password routine?


Cheers,
Tink
 
Old 04-13-2005, 10:03 AM   #6
bspicer
LQ Newbie
 
Registered: Apr 2002
Posts: 26

Original Poster
Rep: Reputation: 15
Doesn't .bash_profile need something to check password expiration or does that happen automatically when logging in?
 
Old 04-13-2005, 02:21 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Yep, password expiry is something checked by the
program login, not bash.


Cheers,
Tink
 
Old 05-12-2007, 04:26 AM   #8
Oupa
LQ Newbie
 
Registered: Apr 2007
Location: Welkom, South Africa
Distribution: RHL + Mandriva
Posts: 15

Rep: Reputation: 0
password Max days

Tinkster idea works well.
I doubt whether the auditors would approve of 90 days, I know when we were audited they thought my 30 days was excessive. Oupa.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set the password policy and lockout policy bin_shell Linux - Security 4 03-24-2010 04:30 PM
RHat 9 password expiration send-more-ux Red Hat 3 10-01-2003 06:56 PM
Samba Password Expiration kharris Linux - Software 1 09-22-2003 06:25 AM
Password expiration - help klmn1 Linux - General 1 12-31-2002 12:04 AM
Password expiration klmn1 Linux - Networking 1 12-26-2002 01:08 PM


All times are GMT -5. The time now is 11:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration