Verifies the correctness of a user definition.
usrck { -n | -p | -t | -y } { ALL | User ... }
The usrck command verifies the correctness of the user definitions in the user database files, by checking the definitions for ALL the users or for the users specified by the User parameter. If more than one user is specified, there must be a space between the names. You must select a flag to indicate whether the system should try to fix erroneous attributes.
The command first checks the entries in the /etc/passwd file. If you indicate that the system should fix errors, duplicate user names are reported and removed. Duplicate IDs are reported only, because there is no system fix. If an entry has fewer than six colon-separated fields, the entry is reported, but not fixed. The usrck command next checks specific user attributes in other files.
The usrck command verifies that each user name listed in the /etc/passwd file has a stanza in the /etc/security/user, /etc/security/limits and /etc/security/passwd files. The usrck command also verifies that each group name listed in the /etc/group file has a stanza in the /etc/security/group file. The usrck command using the -y flag creates stanzas in the security files for the missing user and group names.
A list of all the user attributes follows, with notations stating which attributes are checked:
If the fix involves disabling a user account, use the chuser command to reset the value of the account_locked attribute to False. You can use the System Management Interface Tool (SMIT) to run the chuser command by entering:
smit chuser
The root user or a member of the security group can enable a user account again by removing the account_locked attribute or setting the account_locked attribute to False. The root user's account is not disabled by the usrck command.
Generally, the sysck command calls the usrck command as part of the verification of a trusted-system installation. If the usrck command finds any errors in the user database, the root user or a member of the security group should execute both the grpck command and the pwdck command.
The usrck command checks to see if the database management security files (/etc/passwd.nm.idx, /etc/passwd.id.idx, /etc/security/passwd.idx, and /etc/security/lastlog.idx) files are up-to-date or newer than the corresponding system security files. Please note, it is all right for the /etc/security/lastlog.idx to be not newer than /etc/security/lastlog. If the database management security files are out-of-date, a warning message appears indicating that the root user should run the mkpasswd command.
The usrck command checks if the specified user can log in. If the user cannot log in because of too many unsuccessful login attempts or because the password is expired, the usrck command issues a warning message indicating why the user cannot log in. If you indicate that the system should fix errors, the system disables the user account if the user cannot log in for the above reasons.
-n | Reports errors but does not fix them. |
-p | Fixes errors but does not report them. |
-t | Reports errors and asks if they should be fixed. |
-y | Fixes errors and reports them. |
Access Control: This command should grant execute (x) access to the root user and members of the security group. The command should be setuid to the root user and have the trusted computing base attribute.
Files Accessed:
Mode | File |
---|---|
r | /etc/passwd |
r | /etc/security/user |
rw | /etc/security/group |
rw | /etc/group |
rw | /etc/security/lastlog |
rw | /etc/security/limits |
rw | /etc/security/audit/config |
rw | /etc/security/login.cfg |
Auditing Events:
Event | Information |
---|---|
USER_Check | user, attribute-error, status |
/usr/bin/usrck | Specifies the path of the usrck command. |
/etc/passwd | Contains basic user attributes. |
/etc/security/user | Contains the extended attributes of users. |
/etc/group | Contains basic group attributes. |
/etc/security/group | Contains the extended attributes of groups. |
/etc/security/lastlog | Contains the last login attributes for users. |
/etc/security/limits | Contains the process resource limits of users. |
/etc/security/audit/config | Contains audit system configuration information. |
/etc/security/login.cfg | Contains configuration information. |
The grpck command, pwdck command, sysck command.
Security Administration in AIX 5L Version 5.2 Security Guide describes the identification and authentication of users, discretionary access control, the trusted computing base, and auditing.