Friday, 23 August 2013

Solaris - checking whether an account is locked or not

Recently we needed to be able to check what the account status on one of the servers was as there was an access problem.

Was it locked out? How do we check from a terminal session?

# passwd -s

This comes back with the accounts status. In this instance it came back with:

# LK

Status information:

PS = a normal working account.
LK = locked out account.
NP = account has no password.

Okay, so the account is locked. How do I unlock it?

# passwd -u

Account is now unlocked - now to find the script that locked the account in the first place......

NOTE: If you want to lock the account on purpose

# passwd -l

0 blogger-disqus:

Post a comment