Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-07-2008, 02:44 PM   #1
LQ Newbie
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
Disabled accounts


I was wondering if there is any kind of command to know if there is any account disabled.
I have both passwd and shadow files opened so I can see manually if there is anyone disabled but I don't know how to calculate it with the field in shadow that tells the number of days when that account will expire.

Thank you in advance!
Old 12-07-2008, 03:45 PM   #2
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Read the manpages for shadow(5) to see the field layout. You should be able to determine days / dates for expiration from there. (I'm not sure about a command that does this for you.)

If there is an exclamation mark (!) in the hashed password field, the account was manually locked.

Note that there are lots of ways to prevent logins, so just because you don't see something obvious in /etc/shadow doesn't mean the account is necessarily usable.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Accounts Disabled? ComputerErik Red Hat 2 05-29-2008 08:59 PM
Disabled Accounts oasisbhrnw99 Linux - General 3 09-02-2005 12:25 PM
su to disabled accounts? sat86 Linux - Security 1 01-24-2005 06:05 AM
Disabled accounts on the login screen! HELP!!!! Adeas Linux - Newbie 5 09-07-2003 08:19 PM
Disabled access to user accounts! HELP! Adeas Mandriva 2 09-07-2003 08:17 PM > Forums > Linux Forums > Linux - Newbie

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

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