reset failed login count / unlock aix account / ..

iKnow-IT banner

As system administrator it is nessesary to lock / unlock users or to reset failed login count. You can do that via smitty or you can do that via command line tasks.
The description below described the command line commands.

Fist become root:
$ su - root

# lsuser -a unsuccessful_login_count <userid> 

reset unsuccessful login count:
# chsec -f /etc/security/lastlog -a unsuccessful_login_count=0 -s <userid>

unlock account:
# chuser account_locked=false <userid>


to lock an AIX account:

# chuser account_locked=true <userid>
check if locked:

# lsuser <userid>

To set the maxage to non expire

# chuser maxage=0 <userid>

To set a password unattended

# "echo <userid>:<password> | chpasswd"

To prevent next logon the password needs to be changed

# pwdadm -c <userid>

see for more options: "man chsec" and "man chuser" and "man lsuser"