Thursday 15 November 2012

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 <account_name>

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

# <account_name> 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_name>

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 <account_name>


2 comments: