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.

nisplus<strong>LDAP</strong>columnFromAttribute \netmasks: addr=ipNetworkNumber, \mask=ipNetmaskNumber, \comment=descriptionAfter substituting attribute <strong>and</strong> column names, this result is the following.nisplus<strong>LDAP</strong>columnFromAttribute \nodeinfo: cname=cn, \inventory=nodeInventory, \owner=nodeOwner7. The delete rule set for netmasks is as follows.nisplus<strong>LDAP</strong>attributeFromColumn \netmasks_del: dn=("ipNetworkNumber=%s,", addr), \ipNetmaskNumber=The above specifies that when a netmasks entry is deleted in <strong>NIS</strong>+, theipNetmaskNumber attribute in the corresponding ou=Networks <strong>LDAP</strong> entry isdeleted. In this case, delete the nodeInventory <strong>and</strong> nodeOwner attributes.Therefore, using the dn specification from item (5) above, results in the following.nisplus<strong>LDAP</strong>attributeFromColumn \nodeinfo_del: dn=("cn=%s+ipHostNumber=%s,", cname, \ldap:ipHostNumber:?one?("cn=%s", cname)), \nodeInventory=, \nodeOwner=The mapping information is complete.8. Stop, <strong>and</strong> later start, the <strong>NIS</strong>+ service, to begin using the mapping file.# svcadm disable network/rpc/nisplus:default9. If data is already in the <strong>NIS</strong>+ nodeinfo table, upload that data to <strong>LDAP</strong>. Put thenew nodeinfo mapping information into a separate file,/var/nis/tmpmapping.# /usr/sbin/rpc.nisd -D -m /var/nis/tmpmapping \-x nisplus<strong>LDAP</strong>initialUpdateAction=to_ldap \-x nisplus<strong>LDAP</strong>initialUpdateOnly=yes10. Add the mapping information from the temporary file, /var/nis/tmpmapping,to the actual mapping file. Use an editor to do this, or append the data (assumingthe actual mapping file is /var/nis/<strong>NIS</strong>+<strong>LDAP</strong>mapping) as follows.# cp -p /var/nis/<strong>NIS</strong>+<strong>LDAP</strong>mapping \/var/nis/<strong>NIS</strong>+<strong>LDAP</strong>mapping.backup# cat /var/nis/tmpmapping >> /var/nis/<strong>NIS</strong>+<strong>LDAP</strong>mappingCaution – Note the double arrow redirection, “>>”. A single arrow, “>”, wouldoverwrite the target file.Chapter 16 • Transitioning From <strong>NIS</strong>+ to <strong>LDAP</strong> 287

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

Saved successfully!

Ooh no, something went wrong!