[CentOS] Checking if a user is 'Disabled'
Fajar Priyanto
fajarpri at arinet.org
Tue Oct 28 12:01:53 UTC 2008
On Tue, Oct 28, 2008 at 7:46 PM, Tom Brown <tom at ng23.net> wrote:
> Hi
>
> I need to create some local users but then 'disable' that user. I know i can
> enable and disable the user by using usermod -L and -U but does anyone know
> if there is a way for me to see the current status of the user? ie locked or
> unlocked?
Can use:
passwd -S username
It will give either:
username PS 2008-10-28 0 9999 7 -1 (Password set, MD5 Crypt)
or when locked:
username LK 2008-10-28 0 9999 7 -1 (Password locked)
I'm sure there's other way.
More information about the CentOS
mailing list