|
|||
Part I About Naming and Directory Services 1. Naming and Directory Services (Overview) 2. The Name Service Switch (Overview) Part II DNS Setup and Administration 3. DNS Setup and Administration (Reference) Part III NIS Setup and Administration 4. Network Information Service (NIS) (Overview) 5. Setting Up and Configuring NIS Service Password Files and Namespace Security Updating and Modifying Existing Maps Binding to a Specific NIS Server Changing a Machine's NIS Domain Using NIS in Conjunction With DNS Part IV LDAP Naming Services Setup and Administration 8. Introduction to LDAP Naming Services (Overview/Reference) 9. LDAP Basic Components and Concepts (Overview) 10. Planning Requirements for LDAP Naming Services (Tasks) 11. Setting Up Sun Java System Directory Server With LDAP Clients (Tasks) 12. Setting Up LDAP Clients (Tasks) 13. LDAP Troubleshooting (Reference) 14. LDAP General Reference (Reference) 15. Transitioning From NIS to LDAP (Overview/Tasks) 16. Transitioning From NIS+ to LDAP Part V Active Directory Naming Service 17. Setting Up Solaris Active Directory Clients A. Solaris 10 Software Updates to DNS, NIS, and LDAP |
Working With NIS MapsThis section contains the following information: Obtaining Map InformationUsers can obtain information from and about the maps at any time by using the ypcat, ypwhich, and ypmatch commands. In the examples that follow, mapname refers both to the official name of a map and to its nickname, if any. To list all the values in a map, type the following. % ypcat mapname To list both the keys and the values (if any) in a map, type the following. % ypcat -k mapname To list all the map nicknames, type any of the following commands. % ypcat -x % ypmatch -x % ypwhich -x To list all the available maps and their master(s), type the following. % ypwhich -m To list the master server for a particular map, type the following. % ypwhich -m mapname To match a key with an entry in a map, type the following. % ypmatch key mapname If the item you are looking for is not a key in a map, type the following. % ypcat mapname | grep item where item is the information for which you are searching. To obtain information about other domains, use the -d domainname options of these commands. If the machine requesting information for a domain other than its default does not have a binding for the requested domain, ypbindconsults the /var/yp/binding/domainname/ypservers file for a list of servers for that domain. If this file does not exist it issues an RPC broadcast for a server. In this case, there must be a server for the requested domain on the same subnet as the requesting machine. Changing a Map's Master ServerTo change the master server for a selected map, you first have to build the map on the new NIS master. Since the old master server name occurs as a key-value pair in the existing map (this pair is inserted automatically by makedbm), copying the map to the new master or transferring a copy to the new master with ypxfr is insufficient. You have to reassociate the key with the new master server name. If the map has an ASCII source file, you should copy this file to the new master. How to Change a Map's Master Server
Modifying Configuration FilesNIS intelligently parses the setup files. Although this makes NIS administration easier, it does make the behavior of NIS more sensitive to changes in the setup and configuration files. Use the procedures in this section when modifying any of the following.
How to Modify Configuration FilesYou do not have to stop and start NIS when changing NIS maps or the map source files. Keep the following in mind.
Modifying and Using the MakefileYou can modify the Makefile provided by default in /var/yp to suit your needs. You can add or delete maps, and you can change the names of some of the directories. Tip - Keep an unmodified copy of the original Makefile for future reference. Working With the MakefileTo add a new NIS map, you must get copies of the ndbm files for the map into the /var/yp/domainname directory on each of the NIS servers in the domain. This is normally done for you by the Makefile. After deciding which NIS server is the master of the map, modify the Makefile on the master server so that you can conveniently rebuild the map. Different servers can be masters of different maps, but in most cases this leads to administrative confusion. Try to set only one server as the master of all maps. Typically a human-readable text file is filtered through awk, sed, or grep to make it suitable for input to makedbm. Refer to the default Makefile for examples. See the make(1S) for general information about the make command. Use the mechanisms already in place in the Makefile when deciding how to create dependencies that make will recognize. Be aware that make is very sensitive to the presence or absence of tabs at the beginning of lines within the dependency rules. A missing tab can invalidate an entry that is otherwise well formed. Adding an entry to the Makefile involves the following.
For example, in order for the Makefile to work on automounter input files, you would have to add the auto_direct.time and auto_home.time maps to the NIS database. To add these maps to the NIS database you need to modify the Makefile. Changing Makefile Macros/VariablesYou can change the settings of the variables defined at the top of the Makefile by changing the value to the right of the equal sign (=). For instance, if you do not want to use the files located in /etc as input for the maps, but you would rather use files located in another directory, such as /var/etc/domainname, you should change DIR from DIR=/etc to DIR=/var/etc/domainname. You should also change PWDIR from PWDIR=/etc to PWDIR=/var/etc/domainname. The variables are the following.
Modifying Makefile EntriesThe following procedure describes how to add and delete databases from the Makefile. How to Modify the Makefile to Use Specific Databases
How to Modify the Makefile to Delete DatabasesIf you do not want the Makefile to produce maps for a specific database, edit the Makefile as follows.
|
||
|