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.

7. Create merged versions of the tables.Use the file merge procedure of your choice to produce the merged tables. If noother tools are available, you can use diff(1) to collect differences between the/before <strong>and</strong> /after files, <strong>and</strong> merge manually with a text editor.The following example assumes that the merged results are available in /after.8. Load the merged data into <strong>NIS</strong>+. The following example uses the group table.# nisaddent -m -f /after/group group9. Remove <strong>LDAP</strong> entries that should not exist after the merge.A. If there are <strong>LDAP</strong> entries that do not exist in the (now merged) <strong>NIS</strong>+ data, <strong>and</strong>that should not exist in <strong>LDAP</strong> after the upload, you must remove those <strong>LDAP</strong>entries.Your <strong>LDAP</strong> server might provide a convenient method for removing multipleentries, such as a way to delete all entries in a container. If this is not the case, youcan use ldapsearch(1) to generate a list of entries for each container. Forexample, to generate a list of all entries in the ou=Rpc container, useldapsearch(1) as follows.# ldapsearch -h server-address -D bind-DN -w password \-b ou=Rpc,search-base ’objectClass=*’ dn | \grep -i ou=Rpc | grep -v -i \^ou=Rpc > \/tmp/delete-dnSee “Performance <strong>and</strong> Indexing” on page 272 for an explanation of themeta-arguments (server-address, bind-DN, for example).B. You can now edit the result file (/tmp/delete-dn) to specify only those entriesthat should be removed. Alternatively, in order to remove all entries in thecontainer, use the file as is, <strong>and</strong> rely on the <strong>NIS</strong>+ upload to restore the <strong>LDAP</strong> data.Either way, you should backup the <strong>LDAP</strong> data before performing the ldapdeleteoperation below.C. Use ldapdelete to remove <strong>LDAP</strong> entries, redirecting stdout (which usuallyis one blank line for each entry removed) to /dev/null.# ldapdelete -h server-address -D bind-DN -w password \/tmp/delete-dn /dev/nullD. Repeat the above procedure for each container that has at least one entry whichmust be removed.10. Upload the merged <strong>NIS</strong>+ data to <strong>LDAP</strong>.a. Stop the <strong>NIS</strong>+ service.# svcadm disable network/rpc/nisplus:defaultb. Perform the upload.# /usr/sbin/rpc.nisd -D -m tmpmap \-x nisplus<strong>LDAP</strong>initialUpdateAction=to_ldap \-x nisplus<strong>LDAP</strong>initialUpdateOnly=yesChapter 16 • Transitioning From <strong>NIS</strong>+ to <strong>LDAP</strong> 267

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

Saved successfully!

Ooh no, something went wrong!