Lists attributes in the security stanza files.
lssec [ -c ] [ -f File ] [ -s Stanza ] [ -a Attribute ... ]
The lssec command lists attributes stored in the security configuration stanza files. The following security configuration files contain attributes that you can specify with the Attribute parameter:
When listing attributes in the /etc/security/environ, /etc/security/lastlog, /etc/security/limits, /etc/security/passwd, and /etc/security/user files, the stanza name specified by the Stanza parameter must be either a valid user name or default. When listing attributes in the /etc/security/group file, the stanza name specified by the Stanza parameter must be either a valid group name or default. When listing attributes in the /usr/lib/security/mkuser.default file, the Stanza parameter must be either admin or user. When listing attributes in the /etc/security/portlog file, the Stanza parameter must be a valid port name. When listing attributes in the /etc/security/login.cfg file, the Stanza parameter must be either a valid port name, a method name, or the usw attribute.
You cannot list the password attribute of the /etc/security/passwd file with the lssec command.
Only the root user or a user with PasswdAdmin authorization can list the lastupdate and flags attributes for administrative users.
Access Control: This command grants execute access only to the root user and the security group. The command has the trusted computing base attribute and runs the setuid subroutine for the root user to access the security databases.
lssec -f /etc/security/lastlog -s root -a unsuccessful_login_countThe system displays the result as follows:
root unsuccessful_login_count=15
lssec -f /etc/security/login.cfg -s /dev/tty2 -a logintimesThe system displays the result as follows:
/dev/tty0 logintimes=!january1,!july4,!december25
lssec -c -f /etc/security/user -s default -a tpath -a ttysThe system displays the result as follows:
#name:tpath:ttys default:nosak:ALL
/usr/bin/lssec | Specifies the path to the lssec command. |
/etc/security/environ | Contains the environment attributes of users. |
/etc/security/group | Contains extended attributes of groups. |
/etc/security/lastlog | Defines the last login attributes for users. |
/etc/security/limits | Defines resource quotas and limits for each user. |
/etc/security/login.cfg | Contains port configuration information. |
/usr/lib/security/mkuser.default | Contains the defaults values for new users. |
Contains password information. | |
/etc/security/portlog | Contains unsuccessful login attempt information for each port. |
/etc/security/user | Contains the extended attributes of users. |
The chgroup command, chsec command, chuser command, grpck command, login command, lsgroup command, lsuser command, mkgroup command, mkuser command, passwd command, pwdck command, rmgroup command, rmuser command, su command, usrck command.
The getgroupattr subroutine, getportattr subroutine, getuserattr subroutine, getuserpw subroutine, putgroupattr subroutine, putportattr subroutine, putuserattr subroutine, putuserpw subroutine.
List of Security and Auditing Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.