13.07.2015 Views

Naming and Directory Services (DNS, NIS, and LDAP)

Naming and Directory Services (DNS, NIS, and LDAP)

Naming and Directory Services (DNS, NIS, and LDAP)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

nis<strong>LDAP</strong>objectDN hosts: \ou=hosts,?one?, \objectClass=device, \objectClass=ipHostTo:nis<strong>LDAP</strong>objectDN hosts: \ou=newHosts,?one?, \objectClass=device, \objectClass=ipHostThis change causes entries to be mapped underdn: ou=newHosts, dom=domain1, dc=sun, dc=cominstead of underdn: ou=hosts, dom=domain1, dc=sun, dc=com.Example 2–Implementing a Custom MapThis example shows how to implement a custom map.A hypothetical map, servdate.bynumber, contains information about the servicing datesfor systems. This map is indexed by the machine’s serial number which, in thisexample, is 123. Each entry consists of the machine owner’s name, a colon, <strong>and</strong> acomma-separated list of service dates, such as John Smith:1/3/2001,4/5/2003.The old map structure is to be mapped onto <strong>LDAP</strong> entries of the following form:dn: number=123,ou=servdates,dc=... \number: 123 \userName: John Smith \date: 1/3/2001 \date: 4/5/2003 \...objectClass: servDatesBy examining the <strong>NIS</strong><strong>LDAP</strong>mapping file, you can see that the mapping closest to therequired pattern is group. The custom mappings can be modeled on the groupmapping. Since there is only one map, no nis<strong>LDAP</strong>databaseIdMapping attribute isrequired. The attributes to be added to <strong>NIS</strong><strong>LDAP</strong>mapping are the following:nis<strong>LDAP</strong>entryTtl servdate.bynumber:1800:5400:3600nis<strong>LDAP</strong>nameFields servdate.bynumber: \("%s:%s", uname, dates)nis<strong>LDAP</strong>objectDN servdate.bynumber: \240 System Administration Guide: <strong>Naming</strong> <strong>and</strong> <strong>Directory</strong> <strong>Services</strong> (<strong>DNS</strong>, <strong>NIS</strong>, <strong>and</strong> <strong>LDAP</strong>) • January 2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!