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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

nodeInventory=*:\The third <strong>and</strong> fourth lines are the write portion of the nisplus<strong>LDAP</strong>objectDN,<strong>and</strong> they specify where in <strong>LDAP</strong> nodeinfo data is written, as well as the rule setthat is used when nodeinfo data is deleted. In this case, create a delete rule setidentified by the database id nodeinfo_del. Because you are always writing toan existing entry in ou=Hosts, you only need to specify the object class for thenodeinfo data proper as follows.ou=Hosts,?one?objectClass=nodeInfo:\dbid=nodeinfo_delPutting it all together, our nisplus<strong>LDAP</strong>objectDN is the following.nisplus<strong>LDAP</strong>objectDN nodeinfo:ou=Hosts,?one?objectClass=nodeInfo,\nodeInventory=*:\ou=Hosts,?one?objectClass=nodeInfo:\dbid=nodeinfo_del5. Create the rule set that maps nodeinfo data from <strong>NIS</strong>+ to <strong>LDAP</strong>. The template(from netmasks) is the following.nisplus<strong>LDAP</strong>attributeFromColumn \netmasks: dn=("ipNetworkNumber=%s,", addr), \ipNetworkNumber=addr, \ipNetmaskNumber=mask, \description=commentThe ou=Hosts container has an additional complication in this case, as RFC 2307specifies the dn should contain the IP address. However, the IP address is notstored in the nodeinfo table, so you must obtain it in another manner.Fortunately, the crednode mapping in the template file shows how to obtain theIP address.nisplus<strong>LDAP</strong>attributeFromColumn \crednode: dn=("cn=%s+ipHostNumber=%s,", \(cname, "%s.*"), \ldap:ipHostNumber:?one?("cn=%s", (cname, "%s.*"))), \Thus, you can copy that portion of the crednode mapping. In this case, however,the cname column value is the actual host name (not the principal name), so youdo not need to extract just a portion of the cname. Making the obvioussubstitutions of attribute <strong>and</strong> column names, the nodeinfo mapping becomes thefollowing.nisplus<strong>LDAP</strong>attributeFromColumn \nodeinfo: dn=("cn=%s+ipHostNumber=%s,", cname, \ldap:ipHostNumber:?one?("cn=%s", cname)), \nodeInventory=inventory, \nodeOwner=owner6. When mapping data from <strong>LDAP</strong> to <strong>NIS</strong>+, the template netmasks entry is asfollows.286 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!