Previous Page
Next Page

Key Terms

Exercises

For these exercises, you'll need two Solaris systems attached to a network. One system will be configured as the NIS master server, and the other will be the NIS client.

12.1. Setting Up the NIS Master Server

In this exercise, you'll go through the steps to set up your NIS master server.

Estimated Time: 20 minutes

1.
Login as root.

2.
Set your domain name if it is not already set:

domainname <yourname>.com

Populate the /etc/defaultdomain file with your domain name.

domainname > /etc/defaultdomain

3.
On the system that will become your master NIS server, create the master /var/yp/passwd, /var/yp/group, and /var/yp/hosts files. Follow the instructions described in this chapter to create these files.

4.
Change entries for /etc to /var/yp in /var/yp/makefile as follows:

Change the following:

DIR = /etc
PWDIR = /etc

into the following:

DIR = /var/yp
PWDIR = /var/yp

5.
Create the name service switch file by copying the NIS template file as follows:

cp /etc/nsswitch.nis /etc/nsswitch.conf

6.
Run the ypinit command as follows to set up this system as the NIS master:

ypinit -m

When asked for the next host to add as an NIS slave server, enter CTRL+D. For this exercise, we will not be adding an NIS slave server.

Indicate you do not want ypinit to quit on nonfatal errors by typing N when asked.

You'll know the process was successful when you get the message indicating that the current system was set up as a master server without any errors.

7.
Start up the NIS service on the master server by running

svcadm enable network/nis/server

8.
Verify that the NIS master server is up by typing

ypwhich -m

12.2. Setting Up the NIS Client

In this exercise, you'll go through the steps to set up your NIS client.

Estimated time: 10 minutes

1.
Login as root.

2.
Set your domain name if it is not already set:

domainname <yourname>.com

Populate the /etc/defaultdomain file with your domain name:

domainname > /etc/defaultdomain

3.
Create the name service switch file by copying the NIS template file as follows:

cp /etc/nsswitch.nis /etc/nsswitch.conf

4.
Configure the client system to use NIS by running the ypinit command as follows:

ypinit -c

You will be asked to identify the NIS server from which the client can obtain name service information. Type the NIS master server name, followed by a carriage return.

When asked for the next host to add, press Ctrl+D.

5.
Start the NIS daemons by executing the following script:

svcadm enable network/nis/server

6.
Verify that the NIS client is bound to the NIS master by typing

ypwhich

The master server name should be displayed.

7.
Test the NIS client by logging out and logging back in using a login name that is no longer in the local /etc/passwd file and is managed by NIS.

Exam Questions

1.

Which of the following services stores information that users, systems, and applications must have access to in order to communicate across the network, in a central location?

  1. NIS

  1. NFS service

  1. Automount

  1. AutoFS


2.

Which of the following is not a Solaris name service?

  1. DES

  1. /etc

  1. NIS+

  1. DNS


3.

Which of the following is the traditional Unix way of maintaining information about hosts, users, passwords, groups, and automount maps?

  1. DNS

  1. NIS

  1. NIS+

  1. /etc


4.

What are the NIS administration databases called?

  1. Files

  1. Tables

  1. Maps

  1. Objects


5.

What is the set of maps shared by the servers and clients called?

  1. A table

  1. An object

  1. The NIS domain

  1. None of the above


6.

When you add a new system to a network running NIS, you have to update the input file in the master server and run which of the following?

  1. makedbm

  1. make

  1. yppush

  1. ypinit


7.

Which of the following commands is used to display the values in an NIS map?

  1. ypcat

  1. ypwhich

  1. ypserv

  1. ypbind


8.

Which of the following commands can be used to determine which server is the master of a particular map?

  1. ypbind

  1. ypcat

  1. ypserv

  1. ypwhich -m


9.

Which of the following propagates a new version of an NIS map from the NIS master server to NIS slave servers?

  1. ypinit

  1. yppush

  1. make

  1. yppoll


10.

Which of the following sets up master and slave servers and clients to use NIS?

  1. makedbm

  1. make

  1. ypinit

  1. yppush


11.

Which of the following is the configuration file for the name service switch?

  1. nsswitch.conf

  1. resolve.conf

  1. /etc/netconfig

  1. nsswitch.nis


12.

Each line of which of the following files identifies a particular type of network information, such as host, password, and group, followed by one or more sources, such as NIS+ tables, NIS maps, the DNS hosts table, or local /etc?

  1. resolve.conf

  1. nsswitch.conf

  1. /etc/netconfig

  1. nsswitch.nis


13.

In the name service switch file, what does the following entry mean if the NIS naming service is being used?

hosts: nis [NOTFOUND=return] files

  1. Search the NIS map and then the local /etc/hosts file.

  1. Search only the NIS hosts table in the NIS map.

  1. Search only the /etc/hosts file.

  1. Do not search the NIS hosts table or the local /etc/hosts file.


14.

Which name service switch template files are found in Solaris 10? Choose all that apply.

  1. nsswitch.files

  1. nsswitch.nis+

  1. nsswitch.nisplus

  1. nsswitch.fns


15.

What are the four types of NIS+ access rights?

  1. Read, write, create, modify

  1. Read, write, execute, no access

  1. Read, write, delete, modify

  1. Read, modify, create, destroy


16.

Which of the following is the name service provided by the Internet for TCP/IP networks?

  1. DNS

  1. NIS

  1. NIS+

  1. None of the above


17.

Each server implements DNS by running a daemon called

  1. named

  1. in.named

  1. nfsd

  1. dnsd


18.

The primary task of DNS is to provide

  1. Security service

  1. Name-to-address resolution

  1. Name service

  1. Namespace services


19.

Which of the following describes the difference between NIS+ authentication and authorization?

  1. Authentication is checking whether the information requester is a valid user on the network, and authorization determines whether the particular user is allowed to have or modify the information.

  1. Authorization is checking whether the information requester is a valid user on the network, and authentication determines whether the particular user is allowed to have or modify the information.


20.

This file determines how a particular type of information is obtained and in which order the naming services should be queried. Which file is being described?

  1. /etc/nsswitch.conf

  1. /etc/resolve.conf

  1. /etc/nsswitch.nis

  1. /etc/nsswitch.nisplus


21.

How many name services does Solaris 10 support?

  1. 3

  1. 4

  1. 5

  1. 6


22.

Which of the following is the name service used by the Internet?

  1. DNS

  1. NIS

  1. NIS+

  1. DES


23.

Which of the following commands is used to set up an NIS master server?

  1. ypserver -m

  1. nisinit -m

  1. nisserver -m

  1. ypinit -m


Answers to Exam Questions

1.

A. NIS stores information about workstation names, addresses, users, the network itself, and network services. For more information, see the "Name Services Overview" section.

2.

A. DES is not a Solaris name service. For more information, see the "Name Services Overview" section.

3.

D. /etc files are the traditional Unix way of maintaining information about hosts, users, passwords, groups, and automount maps. For more information, see the "Name Services Overview" section.

4.

C. The NIS administration databases are called maps. For more information, see the "Name Services Overview" section.

5.

C. The set of maps shared by the servers and clients is called the NIS domain. For more information, see the "Name Services Overview" section.

6.

B. To update the input file in the master server with a new system name, you'll execute the /usr/ccs/bin/make command. For more information, see the "Configuring an NIS Master Server" section.

7.

A. Just as you use the cat command to display the contents of a text file, you can use the ypcat command to display the values in a map. For more information, see the "Configuring an NIS Master Server" section.

8.

D. You can use the ypwhich -m command to determine which server is the master of a particular map. For more information, see the "Configuring an NIS Master Server" section.

9.

B. The command yppush propagates a new version of an NIS map from the NIS master server to NIS slave servers. For more information, see the "Configuring an NIS Master Server" section.

10.

C. The ypinit command builds and installs an NIS database and initializes the NIS client's (and server's) ypservers list. For more information, see the "Configuring an NIS Master Server" section.

11.

A. In setting up the NIS, set up the name service switch, which involves editing the /etc/nsswitch.conf file. For more information, see the "The Name Service Switch" section.

12.

B. Each line of the /etc/nsswitch.conf file identifies a particular type of network information, such as host, password, and group, followed by one or more sources, such as NIS+ tables, NIS maps, the DNS hosts table, or the local /etc. For more information, see the "Setting Up the Name Service Switch" section.

13.

B. The following entry in the nsswitch.nis template states that only the NIS hosts table in the NIS map is searched:

hosts: nis [NOTFOUND=return] files

For more information, see the "Setting Up the Name Service Switch" section.

14.

A, C. The following template files are available: nsswitch.files, nsswitch.nisplus, nsswitch.nis, nsswitch.dns, and nsswitch.ldap. For more information, see the "The Name Service Switch" section.

15.

D. Access rights are similar to file permissions. There are four types of access rights: read, modify, create, and destroy. For more information, see the "NIS+ Security" section.

16.

A. DNS is the name service provided by the Internet for Transmission Control Protocol/Internet Protocol (TCP/IP) networks. For more information, see the "DNS" section.

17.

B. Each server implements DNS by running a daemon called in.named. For more information, see the "DNS" section.

18.

B. The process of finding a computer's IP address by using its hostname as an index is referred to as name-to-address resolution, or mapping. The primary task of DNS is to provide name-to-address resolution. For more information, see the "DNS" section.

19.

A. Authentication is used to identify NIS+ principals. An NIS+ principal can be a client user or a client workstation. Every time a principal (user or system) tries to access an NIS+ object, the user's identity and secure RPC password are confirmed and validated. Authorization is used to specify access rights. For more information, see the "NIS+ Security" section.

20.

A. The /etc/nsswitch.conf file determines how a particular type of information is obtained and in which order the naming services should be queried. For more information, see the "The Name Service Switch" section.

21.

C. There are five name services that Solaris 10 supports: /etc files, NIS, NIS+, DNS, and LDAP. For more information, see the "Name Services Overview" section.

22.

A. DNS is the name service used by the Internet. For more information, see the "DNS" section.

23.

D. To build new maps on the master server, type /usr/sbin/ypinit -m. For more information, see the "Configuring an NIS Master Server" section.


Previous Page
Next Page