LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 04-12-2005, 10: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, 10: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, 10: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, 10: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, 04:45 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
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, 09: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, 01:21 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

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


Cheers,
Tink
 
Old 05-12-2007, 03: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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 03:30 PM
RHat 9 password expiration send-more-ux Red Hat 3 10-01-2003 05:56 PM
Samba Password Expiration kharris Linux - Software 1 09-22-2003 05:25 AM
Password expiration - help klmn1 Linux - General 1 12-30-2002 11:04 PM
Password expiration klmn1 Linux - Networking 1 12-26-2002 12:08 PM


All times are GMT -5. The time now is 11:38 AM.

Main Menu
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