LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Disabled accounts (https://www.linuxquestions.org/questions/linux-newbie-8/disabled-accounts-688956/)

Darklulu 12-07-2008 02:44 PM

Disabled accounts
 
Hello!

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!

anomie 12-07-2008 03:45 PM

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.


All times are GMT -5. The time now is 04:54 PM.