Re: Listing locked user accounts on Linux
By: Chris Trainor to Chris Perrault on Wed Apr 25 2012 06:57 pm
> > I curious how others go about getting a listing of locked user accounts
> > on Linux?
> Depends on the config, but most modern Linux boxes keep the passwords
> stored in a text file. /etc/shadow. The password itself is encrypted,
> but if the password field starts with a ! then the account is locked.
> The password field in the shadow file is the 2nd field. (first being
> the username).
fyi, the older less secure method was /etc/passwd, but most systems
have their passwords shadow'ed... Actually, /etc/passwd should also
get you a list of user accounts and passwords, as well as groups and
user id's, etc...
---
■ Synchronet ■ Roach Guts -- kingcoder.net
|