User Tools

Site Tools


aix:user_mgmt

This is an old revision of the document!


Users and group management

Add to the following commands -R LDAP if LDAP is used, default is -R files

Set password for user user1

echo user1:passwd1 | chpasswd

And remove change password at first connection

echo user1:passwd1 | chpasswd -c

You can also remove the flag ADMCHG from /etc/security/passwd using

pwdadm -c user1

How to read user password was last changed in AIX

To check with particular user’s last password changed in AIX. Admin can check by execute following command

root@aix-server1:/etc/security# pwdadm -q user3
user3:
lastupdate = 1406597936

To determine when a password was last set or changed, as indicated in the last update value in pwdadm output. The UTC time stamp in seconds will need to be converted into a more meaningful current date time stamp.

root@aix-server1:/etc/security# perl -le ‘print scalar localtime 1406597936’
Tue Jul 29 09:38:56 2014

read failed login

root@aix-server1:/etc/security# who -a /etc/security/failedlogin
root      - ssh         Jan 21 09:43      ?
root      - ssh         Jan 21 13:25      ?
root      - ssh         Jan 21 14:36      ?

Unlock a user

Reset count

root@aix-server1:/root# lsuser -a unsuccessful_login_count user1
user1 unsuccessful_login_count=7
root@aix-server1:/root# chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s user1

Unlock

root@aix-server1:/root# lsuser -a account_locked user1
user1 account_locked=true
root@aix-server1:/root# chuser account_locked='false' user1
aix/user_mgmt.1637080927.txt.gz · Last modified: 2021/11/16 17:42 by manu