How to Extend the Native LDAP Schema, and User and Group Entries
This procedure describes how to extend the native LDAP schema and populate the user and group objects with the associated Windows names.
Note:
Perform this task before enabling directory-based mapping on your Oracle Solaris system.Example 2-3 Extending the Native LDAP Schema
This example shows a sample LDIF file, nldap_namemap_schema.ldif
, that describes the native LDAP schema changes:
dn: cn=schema changetype: modify add: attributeTypes attributeTypes: ( 1.3.6.1.4.1.42.2.27.5.1.62 NAME 'winAccountName' DESC 'Windows user or group name corresponding to a Unix user or group' EQUALITY caseIgnoreMatch SUBSTRINGS caseIgnoreSubstringsMatch ORDERING caseIgnoreOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) - add: objectClasses objectClasses: ( 1.3.6.1.4.1.42.2.27.5.2.16 NAME 'winAccount' DESC 'Auxiliary class to store Windows name mappings in Unix user/group objects' SUP top AUXILIARY MAY winAccountName )
Load the schema changes into native LDAP. In the following example, the -D
option argument changes a value that is specified in the .ldif
file.
$ ldapmodify -h LDAP-server-name -D cn=admin -w - -f nldap_namemap_schema.ldif
Enter bind password:
modifying entry cn=schema
Example 2-4 Populating Native LDAP User and Group Objects
The following example has Oracle Solaris users uone
, utwo
, and uthree
stored in native LDAP. These Oracle Solaris users are associated with the Windows users user1
, user2
, and user3
, respectively, all in the domain example.com
.
This example shows how to add the Windows user names to the appropriate user objects in native LDAP by using the ldapmodify
command.
First, create an input file, updateUsers
, that associates the Oracle Solaris names with the Windows names:
$ cat updateUsers
dn: uid=uone,ou=passwd,dc=example,dc=com
changetype: modify
add: winAccountName
winAccountName: user1@example.com
dn: uid=utwo,ou=passwd,dc=example,dc=com
changetype: modify
add: winAccountName
winAccountName: user2@example.com
dn: uid=uthree,ou=passwd,dc=example,dc=com
changetype: modify
add: winAccountName
winAccountName: user3@example.com
Then, run the ldapmodify
command to update the user objects on the native LDAP server, neptune
:
$ ldapmodify -h neptune -o mech=gssapi -o authzid='' -f updateUsers