Wednesday, December 2, 2009

User related commands in AIX


User related commands in AIX


id                To list all system identifications for current user

id -gn                To list the default group for current user

id -Gn                 To list all system groups for current user

lsuser root            To list the attribute of user root

lsuser ALL            To list the attributes of all users

lsuser -a ALL            To list all usernames 

lsuser -a HOME ALL        To list the home directory of all users

lsuser -a auth1 auth2 ALL        To list the authentication method for all users

lsuser -a expires ALL        To list expiry date

lsuser -a account_locked ALL     To check account lock status of all users

chuser -a login=true praveen        To enable the user praveen

chuser -a rlogin=true username        Enable user to login remotely to server 

mkuser praveen   Creates user si with default values in /usr/lib/security/mkuser.default

passwd   To change password of current user

passwd username  To change password of a user

pwdadm username  To change password of a user by security (admin) member

mkuser su=false username       Create user without su facility

rmuser username            To remove a user

rmuser -p praveen            To remove user praveen and his all attributes

who          List users with tty nos and ip numbers

who /var/adm/wtmp        Lists history of login logout system startup and shutdown

last root  All previous login and logoff time of root user

who -r     To list the current run level ( cat /etc/.init.state )

whoami   show current user

who am i         To list the exact user (who -m) ( ie. difference between su and su - After su shows previous username bcoz environment not set for current user and su - shows current username bcoz environment has been set)

mkgroup dcm            To create the group dcm

chgroup users=user1,user2,user3 dcm    To add users user1,user2 and user3 to dcm  group

rmgroup dcm            To delete the group dcm

chauthent            To change the authentication methods

chuser unsuccessful_login_count=0 username   To change the unsuccessful login count

pwdck -t ALL / Username  To verify user passwords ( Report error and ask to fix it)

usrck -t ALL / Username   To verify user definition.

grpck -t ALL / groupname  To verify a group




*************


No comments:

Post a Comment