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.

nisplus<strong>LDAP</strong>objectDNThe cname column is expected to contain the canonical name of the node. In otherwords, the same value as that of the cname column in the hosts.org_dir table forthe node.Also assume that the corresponding information is kept in the ou=Hosts container in<strong>LDAP</strong>, <strong>and</strong> that the nodeInfo object class (which is an invention for this example,<strong>and</strong> is not defined in any RFC) has cn as a MUST attribute, <strong>and</strong> that nodeInventory<strong>and</strong> nodeOwner are MAY attributes.In order to upload existing nodeinfo data to <strong>LDAP</strong>, it will be convenient to create thenew mapping attributes in a separate file. You could, for example, use/var/nis/tmpmapping.1. Create a database id that identifies the <strong>NIS</strong>+ table to be mapped.nisplus<strong>LDAP</strong>databaseIdMappingnodeinfo:nodeinfo2. Set the TTL for entries in the nodeinfo table. Since the information is expected tochange only rarely, use a twelve hour TTL. When the rpc.nisd daemon first loadsthe nodeinfo table from disk, the TTLs for entries in the table are r<strong>and</strong>omlyselected to be between six <strong>and</strong> twelve hours.nisplus<strong>LDAP</strong>entryTtl nodeinfo:21600:43200:432003. Identify an existing mapping that has similar properties to the one you want tocreate. In this example, mapping the attribute values is trivial (straightassignment). Instead, the complication is that you store the <strong>LDAP</strong> data in anexisting container, so that you have to be careful during removal of the nodeinfodata. You do not want to remove the entire ou=Hosts entry, just thenodeInventory <strong>and</strong> nodeOwner attributes. You will need a special deletion ruleset for this purpose.To summarize, you are looking for a mapping that shares a container, <strong>and</strong> has adelete rule set. One possible c<strong>and</strong>idate is the netmasks mapping, which shares theou=Networks container, <strong>and</strong> does have a delete rule set.4. The template netmasks mapping has the default mapping (from/var/nis/<strong>NIS</strong>+<strong>LDAP</strong>mapping.template) as follows.netmasks:ou=Networks,?one?objectClass=ipNetwork,\ipNetMaskNumber=*:\ou=Networks,?one?objectClass=ipNetwork:dbid=netmasks_delTransferred to the new mapping for nodeinfo, the database id should benodeinfo, the container ou=Hosts, <strong>and</strong> the object class nodeInfo. Thus, the firstline of the nodeinfo mapping becomes the following.nisplus<strong>LDAP</strong>objectDNnodeinfo:ou=Hosts,?one?objectClass=nodeInfo,\The second line in the netmasks mapping is the part of the search filter thatselects only those ou=Networks entries that contain the ipNetMaskNumberattribute. In this example, select the ou=Hosts entries that have the followingnodeInventory attribute.Chapter 16 • Transitioning From <strong>NIS</strong>+ to <strong>LDAP</strong> 285

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

Saved successfully!

Ooh no, something went wrong!