Configuring LDAP Schema Settings (CLI)
- Go to
configuration services ldapand enter theshowcommand. -
Enter a value for the base search DN.
Use quotation marks around the value to preserve the embedded equal symbols and comma. For example, enter:
hostname:configuration services ldap> set base_dn="dc=example,dc=com"This base search DN is automatically prepended with
ou=peoplefor user searches,ou=groupfor group searches, andou=netgroupfor netgroup searches. If these values do not work in your environment, set different values foruser_search,group_search, ornetgroup_search. The value ofbase_dnis ignored if you provide a value foruser_search,group_search, ornetgroup_search. -
Specify either recursive or non-recursive scope.
For recursive search, set
search_scopetosub. For non-recursive search, setsearch_scopetoone.The value of
search_scopeapplies to all searches. To overridesearch_scopefor specific types of searches, provide a value foruser_search,group_search, ornetgroup_search. -
Set search descriptor properties.
The search descriptor properties are
user_search,group_search, andnetgroup_search.By default,
ou=peopleis prepended to the value ofbase_dnfor user searches,ou=groupis prepended to the value ofbase_dnfor group searches, andou=netgroupis prepended to the value ofbase_dnfor netgroup searches. If your LDAP database does not have subtrees namedpeople,group, ornetgroup, then searches of the database will fail as object not found.Set the values of the search descriptor properties to specify the correct subtrees to search for users, groups, and netgroups. Use quotation marks around the value to preserve the embedded equal symbols and commas. For example, you might enter the following for the search descriptor for users:
hostname:configuration services ldap> set user_search="ou=employees,dc=example,dc=com"If your LDAP database does not have subtrees for users and groups, use the search descriptor properties to re-enter the base search DN to prevent
ou=peopleorou=groupfrom being prepended automatically, as shown in the following example:hostname:configuration services ldap> set group_search="dc=example,dc=com"You must include the value of
base_dnin the search descriptor value. Also include your scope selection. Bothbase_dnandsearch_scopewill be ignored and the search descriptor value will be used instead. The example in the previous paragraph specifies non-recursive search. To specify recursive search, change that example to the following:hostname:configuration services ldap> set group_search="dc=example,dc=com?sub" -
Set the attribute mapping properties.
The default attributes that are used for user searches are shown in table "Attributes of the Users Data Type" in LDAP Custom Mappings. The default attributes that are used for group searches are shown in table "Attributes of the Groups Data Type" in LDAP Custom Mappings.
If your environment stores this data in different attributes, use the
user_mapattr,group_mapattr, andnetgroup_mapattrproperties to specify the attribute to use to retrieve the given data. For example, enter the following command to useemployeenameinstead ofuidas the attribute for user names:hostname:configuration services ldap> set user_mapattr="uid=employeename"Enclose the mapping in quotation marks to preserve the equal symbol in the mapping.
To specify multiple attribute changes, enter a list of mappings with quotation marks around each mapping, as shown in the following example:
hostname:configuration services ldap> set user_mapattr="uid=employeename","uidNumber=employeenumber" -
Set the object mapping properties.
The default object class that is used for user searches is
posixAccount. The default object class that is used for group searches isposixGroup. The default object class that is used for netgroup searches isnisNetgroup.If your environment uses a different object class, use the
user_mapobjclass,group_mapobjclass, andnetgroup_mapobjclassproperties to specify the name of the object class to use. For example, enter the following command to useunixaccountinstead ofposixAccountas the user object class:hostname:configuration services ldap> set user_mapobjclass="posixAccount=unixaccount" -
Commit changed property settings.
Enter
show, review property settings, and entercommit.
Related Topics
-
"LDAP Schema Properties" table in LDAP Properties
-
"Attributes of the Users Data Type" table in LDAP Custom Mappings
-
"Attributes of the Groups Data Type" table in LDAP Custom Mappings