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:
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:
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
|
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:
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
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?
| 2. | Which of the following is not a Solaris name service?
| 3. | Which of the following is the traditional Unix way of maintaining information about hosts, users, passwords, groups, and automount maps?
| 4. | What are the NIS administration databases called?
| 5. | What is the set of maps shared by the servers and clients called?
| 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?
| 7. | Which of the following commands is used to display the values in an NIS map?
| 8. | Which of the following commands can be used to determine which server is the master of a particular map?
| 9. | Which of the following propagates a new version of an NIS map from the NIS master server to NIS slave servers?
| 10. | Which of the following sets up master and slave servers and clients to use NIS?
| 11. | Which of the following is the configuration file for the name service switch?
| 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?
| 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
| Search the NIS map and then the local /etc/hosts file.
| | Search only the NIS hosts table in the NIS map.
| | Search only the /etc/hosts file.
| | 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.
| 15. | What are the four types of NIS+ access rights?
| Read, write, create, modify
| | Read, write, execute, no access
| | Read, write, delete, modify
| | Read, modify, create, destroy
|
| 16. | Which of the following is the name service provided by the Internet for TCP/IP networks?
| 17. | Each server implements DNS by running a daemon called
| 18. | The primary task of DNS is to provide
| | | Name-to-address resolution
| | | | |
| 19. | Which of the following describes the difference between NIS+ authentication and authorization?
| 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.
| | 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?
| 21. | How many name services does Solaris 10 support?
| 22. | Which of the following is the name service used by the Internet?
| 23. | Which of the following commands is used to set up an NIS master server?
|
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. |
|