Oracle® Solaris 11 Security Guidelines

Exit Print View

Updated: August 2014
 
 

How to Set Account Locking for Regular Users

Use this procedure to lock regular user accounts after a certain number of failed login attempts.


Note -  Roles are shared accounts. Do not set account locking for users who can assume roles or roles because one locked user can lock out the role.

Before You Begin

Do not set this protection system-wide on a system that you use for administrative activities. Rather, monitor the administrative system for unusual use and keep it available for administrators.

You must assume the root role. For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  1. Set the LOCK_AFTER_RETRIES security attribute to YES.

    Choose the scope of the attribute value.

    • Set system-wide.

      This protection applies to any user who attempts to use the system.

      # pfedit /etc/security/policy.conf
      ...
      #LOCK_AFTER_RETRIES=NO
      LOCK_AFTER_RETRIES=YES
      ...
    • Set per user.

      This protection applies only to the user for whom you run this command. If you have many users, this is not a scalable solution.

      # usermod -K lock_after_retries=yes username
    • Create and assign a rights profile.

      This protection applies to any user or system where you assign this rights profile.

      1. Create the rights profile.
        # profiles -p shared-profile -S ldap
        shared-profile: set lock_after_retries=yes
        ...

        For more information on creating rights profiles, see Creating Rights Profiles and Authorizations in Securing Users and Processes in Oracle Solaris 11.2 .

      2. Assign the rights profile to users or system-wide.

        If you have many users that share a rights profile, setting this value in a rights profile can be a scalable solution.

        # usermod -P shared-profile username

        You can also assign the profile per system in the policy.conf file.

        # pfedit /etc/security/policy.conf
        ...
        #PROFS_GRANTED=Basic Solaris User
        PROFS_GRANTED=shared-profile,Basic Solaris User
  2. Set the RETRIES security attribute to 3.

    Choose the scope of the attribute value.

    • Set system-wide.
      # pfedit /etc/default/login
      ...
      #RETRIES=5
      RETRIES=3
      ...
    • Set per user.
      # usermod -K lock_after_retries=3 username
    • Create and assign a rights profile.

      Follow the steps in Step 4 and to create a rights profile that includes lock_after_retries=3.

See also