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.

Note – In order to use <strong>LDAP</strong> naming services, you must also properly configure all<strong>LDAP</strong> client machines, in addition to modifying the nsswitch.conf. SeeChapter 12 for more information.■■■<strong>NIS</strong>+ template file. The nsswitch.nisplus configuration file specifies <strong>NIS</strong>+ as theprimary source for all information except passwd, group, automount, <strong>and</strong>aliases. For those four files, the primary source is local /etc files. The secondarysource is an <strong>NIS</strong>+ table. The [NOTFOUND=return] search criterion instructs theswitch to stop searching the <strong>NIS</strong>+ tables if the switch gets a “No such entry”message. The switch searches through local files only if the <strong>NIS</strong>+ server isunavailable.<strong>NIS</strong> template file. The nsswitch.nis configuration file is almost identical to the<strong>NIS</strong>+ configuration file, except that <strong>NIS</strong> file specifies <strong>NIS</strong> maps in place of <strong>NIS</strong>+tables. Because the search order for passwd <strong>and</strong> group is files nis, you don’tneed to place the + entry in the /etc/passwd <strong>and</strong> /etc/group files.Files template file. The nsswitch.files configuration file specifies local /etc filesas the only source of information for the machine. There is no “files” source fornetgroup, so the client does not use that entry in the switch file.Copy the template file that most closely meets your requirements to thensswitch.conf configuration file <strong>and</strong> then modify the file as needed.For example, to use the <strong>LDAP</strong> template file, you would type the following comm<strong>and</strong>.mymachine# cp /etc/nsswitch.ldap /etc/nsswitch.confThe Default Switch Template FilesThe following four switch files are supplied with the Solaris product.EXAMPLE 2–1 <strong>NIS</strong>+ Switch File Template: nsswitch.nisplus### /etc/nsswitch.nisplus:### An example file that could be copied over to /etc/nsswitch.conf;# it uses <strong>NIS</strong>+ (<strong>NIS</strong> Version 3) in conjunction with files.## "hosts:" <strong>and</strong> "services:" in this file are used only if the# /etc/netconfig file has a "-" for nametoaddr_libs of "inet"# transports.# the following two lines obviate the "+" entry in /etc/passwd# <strong>and</strong> /etc/group.Chapter 2 • The Name Service Switch (Overview) 37

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

Saved successfully!

Ooh no, something went wrong!