LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 02-26-2008, 09:16 AM   #1
Atnor
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 0
How to track account disabling / password locking


I have multiple RH AS3 and RH ES4 systems. I would like to enforce the following ruleset: All user's must reset their passwords at least every 90 days, if they don't, after the 95th day, the account should be locked/disabled.

I've set these parameters up with /etc/default/useradd, /etc/login.defs, and my /etc/shadow file shows all the rules correctly. And, all of this works fine. When I run "chage -l <username>", I see what I expect to, and user's who've gone too long arent able to access the system after the 95th day.

My problem is, I'd like to be able to actually track that this is all working. Or, more to the point, I have security people who want to be able to verify that the rules are being enforced

Right now, they are able to report to me how long it's been since the user last changed their password (cool, np), but when they go to verify the account is "locked" they can't seem to do it.

Their first attempt seems to be that they check the encrypted password string in /etc/shadow for a ! or !! at the front to indicate the account is actually locked. I always thought this was how it was done, however, I've found that that only seems to go in if the account is manually locked, like via the passwd command. If the account is simply aged out and disabled by the default rules, the password string in /etc/shadow stays exactly the same, the user is just denied access.

So, I guess I'm asking, is there a good way to check that a user's account is locked out, other than grabbing the dates in either /etc/shadow (#days since password was last changed) and comparing it to today's date (which still doesnt really give me much) or looking at the "Password Inactive" field from chage and determining visually that the account is past that date and therefore just "know" that it is disabled.

It just seems that this would be something common enough to have this info available somewhere in the system, and not need a homegrown script to cull it out. Havent found anything so far though.
Any ideas?
 
Old 02-26-2008, 06:19 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
For something like that, assuming you are running real RHEL ie paid for, I'd ask them, that's what you are paying for.
As you say, there ought to be method/tool and if not, maybe they'll build one.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(proftpd) Disabling chmod on account disallows them to login? SimbaSpirit Linux - Newbie 2 02-09-2008 12:26 AM
Evolution crashes when disabling imap account marie@dk Linux - Software 0 03-18-2007 10:12 AM
disabling the root account shifter Slackware 23 06-04-2006 11:12 PM
How can I change e-mail password(or linux account password) with php in website?? yusuf Programming 1 05-28-2004 09:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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

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
Open Source Consulting | Domain Registration