6.11 Set Retry Limit for Account Lockout - Check if 'RETRIES' in /etc/default/login is set to 3.

Information

The RETRIES parameter is the number of failed login attempts a user is allowed before being disconnected from the system and forced to reconnect. When LOCK_AFTER_RETRIES is set in /etc/security/policy.conf, then the user's account is locked after this many failed retries (the account can only be unlocked by the administrator using the command:passwd -u <username>

Solution

Perform the following to implement the recommended state-
cd /etc/default
awk '/RETRIES=/ { $1 = 'RETRIES=3' } { print }' login >login.new
mv login.new login
pkgchk -f -n -p /etc/default/login
cd /etc/security
awk '/LOCK_AFTER_RETRIES=/ { $1 = 'LOCK_AFTER_RETRIES=YES' } { print }' policy.conf >policy.conf.new
mv policy.conf.new policy.conf
pkgchk -f -n -p /etc/security/policy.conf

Be careful when enabling these settings as they can create a denial-of-service situation for legitimate users and applications. Account lockout can be disabled for specific users via the usermod command. For example, the following command disables account lock specifically for the oracle account-
usermod -K lock_after_retries=no oracle

By default the root account is exempt from account lockout.

See Also

https://workbench.cisecurity.org/files/614

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-7a., CSCv6|16.7

Plugin: Unix

Control ID: 07c5b7c26c65e9e6ff84e5217c093d8a5f07ad33492be0f6c5ef63f1b4ade790