Configuring LDAP user attributes

About LDAP user attributes

To authenticate a user, an LDAP client must complete the following operations:

  1. Establish a connection to the LDAP server.

  2. Obtain the user DN from the LDAP server.

  3. Use the user DN and the user's password to bind with the LDAP server.

LDAP provides a DN search mechanism for obtaining the user DN. According to the mechanism, an LDAP client sends search requests to the server based on the search policy determined by the LDAP user attributes of the LDAP client.

The LDAP user attributes include:

Restrictions and guidelines

If the LDAP server contains many directory levels, a user DN search starting from the root directory can take a long time. To improve efficiency, you can change the start point by specifying the search base DN.

Procedure

  1. Enter system view.

    system-view

  2. Enter LDAP server view.

    ldap server server-name

  3. Specify the user search base DN.

    search-base-dn base-dn

    By default, no user search base DN is specified.

  4. (Optional.) Specify the user search scope.

    search-scope { all-level | single-level }

    By default, the user search scope is all-level.

  5. (Optional.) Specify the username attribute.

    user-parameters user-name-attribute { name-attribute | cn | uid }

    By default, the username attribute is cn.

  6. (Optional.) Specify the username format.

    user-parameters user-name-format { with-domain | without-domain }

    By default, the username format is without-domain.

  7. (Optional.) Specify the user object class.

    user-parameters user-object-class object-class-name

    By default, no user object class is specified, and the default user object class on the LDAP server is used. The default user object class for this command varies by server model.