| United States-English |
|
|
|
![]() |
NFS Services Administrator's Guide: HP-UX 11i version 2 > Chapter 5 Configuring
and Administering NIS+Overview of NIS+ |
|
NIS+ allows you to maintain configuration information for many hosts in a set of distributed databases. You can read or modify these databases from any host in the network, if you have the proper credentials and access permissions. Common configuration information, which would have to be maintained separately on each host in a network without NIS+, can be stored and maintained in a single location and propagated to all of the hosts in the network. NIS+ has the following advantages over NIS:
NIS+ has the following disadvantages:
An NIS+ namespace may be “flat,” consisting of a single domain, or it may be hierarchical, like the DNS domain structure. Every namespace has exactly one root domain. All other domains are subdomains of the root domain. Figure 5-1 “Sample NIS+ Namespace” shows a sample hierarchical NIS+ namespace. The master server of the root domain is the root master server. Master servers of subdomains are called non-root master servers. NIS+ backup servers are called replica servers. Replica servers are the NIS+ equivalent of slave servers in an NIS domain. The replica servers of the root domain are called root replica servers, and the replica servers of the non-root domains are called non-root replica servers. A server may serve more than one domain, but it is not recommended. All NIS+ servers must also be NIS+ clients. The root master and root replica servers are clients of the root domain. However, a non-root server serves a subdomain of the domain in which it is a client. The domain in which it is a client is the parent domain of the domain it serves. An NIS+ domain is an NIS+ directory whose name is the domain name. An NIS+ directory is not an HP-UX directory. You must use the nisls(1) command to see the directory structure of an NIS+ domain. Figure 5-2 “NIS+ Directory Structure of the “Wiz.Com.” and “Eng.Wiz.Com.” Domains” shows the NIS+ directory structure of the Wiz.Com.and Eng.Wiz.Com. domains. Each NIS+ domain contains two NIS+ subdirectories, called groups_dir and org_dir. The groups_dir subdirectory contains NIS+ groups, which are like HP-UX groups except they are used only to determine access to NIS+ objects. The org_dir subdirectory contains all the standard NIS+ tables. Any other NIS+ directories are subdomains. In the example in Figure 5-2 “NIS+ Directory Structure of the “Wiz.Com.” and “Eng.Wiz.Com.” Domains”, Eng.Wiz.Com. is a subdomain. The full name of an NIS+ object includes the names of all the NIS+ directories in its directory path. For example, the full name of the hosts table in the Wiz.Com. domain is hosts.org_dir.Wiz.Com. To specify an entry in this table, you need to specify enough column values to uniquely identify it. For example, to identify a host whose canonical name in the cname column is romney, you would specify [cname=romney],hosts.org_dir.Wiz.Com. If the default domain on the local host is Wiz.Com., you can leave off the domain name and type just hosts.org_dir or [cname=romney],hosts.org_dir. Domain names always end in a period, except when you are setting the default domain with the domainname command. NIS+ information is stored in the /var/nis directory. On a server, the /var/nis/data subdirectory, or the /var/nis/hostname subdirectory (where hostname is the name of the local host), contains the NIS+ directories and tables that make up the domain. You can make changes to the NIS+ objects from any NIS+ client in the namespace, if you are authenticated and have the proper access permissions. Whenever anyone makes a change to an NIS+ object, the change is sent to all the replica servers. NIS+ sends only the changes to replica servers, not whole tables. A transaction log in the /var/nis directory on each server keeps track of all the changes that have been made. To keep the transaction log from growing too large, you must checkpoint the domain regularly. When you checkpoint the domain (with the nisping[1M] command), the changes in the transaction log on all the servers are incorporated into the tables on disk, and the transaction log is cleared. An NIS+ client may get information from any domain in the namespace, if it is authenticated and has the proper access permissions. Each NIS+ client has a file called NIS_COLD_START in the /var/nis directory, which contains the internet addresses of servers the client can contact for NIS+ information. Because all servers are also clients, every server has a cold start file, too. An NIS+ client does not “bind” to a server the way an NIS client does. It contacts a server directly to request information. If a client requests information about a domain from a server that does not serve the domain, the server tells the client how to find a server that serves the domain. As the client learns about other servers, it adds the information to a cache file called NIS_SHARED_DIRCACHE in the /var/nis directory, and it uses the information to find servers later. By default, an NIS+ domain that you set up with the standard scripts contains the NIS+ tables listed in Table 5-1 “Standard NIS+ Tables”. Table 5-1 “Standard NIS+ Tables” also gives the configuration files and the NIS maps that are equivalent to the NIS+ tables. Table 5-1 Standard NIS+ Tables
Authentication is the process by which NIS+ determines who you are. To be an authenticated NIS+ user, you must have an entry in the cred table, and your password must decrypt your secure RPC key, which is stored in the cred table. When you log in and supply your password, NIS+ identifies you as an NIS+ principal. If you are a non-root user, your NIS+ principal name is loginname.domainname. For example, if you log in as user ming in domain Wiz.Com., your NIS+ principal name is ming.Wiz.Com. If you are a root user, NIS+ identifies you by the host name where you logged in, and your NIS+ principal name is hostname.domainname. For example, if you logged in as root to host garlic in the Eng.Wiz.Com. domain, your NIS+ principal name is garlic.Eng.Wiz.Com. The cred table stores two types of credentials: Local and DES. A Local credential associates an NIS+ principal name with a user ID. Only non-root users have Local credentials. A DES credential contains the secure RPC keys for authenticating an NIS+ user. Both root and non-root users may have DES credentials. Each NIS+ principal has only one DES credential, in his or her home domain, but he or she may have Local credentials in many domains. Authorization is the process by which NIS+ determines what you are allowed to do with NIS+ objects. Every NIS+ object has a permissions string that determines who can read, modify, create, or destroy it. This permissions string is similar to the HP-UX file permissions string that grants read, write, and execute permissions to HP-UX users. NIS+ grants 4 types of permissions: (r)ead, (m)odify, (c)reate, and (d)estroy. It grants permissions to 4 types of users: nobody, owner, group, and world. Figure 5-3 “Format of the NIS+ Permissions String” shows the format of an NIS+ permissions string: User nobody is the group of all unauthenticated users. If you have no entry in the cred table, NIS+ identifies you as user nobody and assigns you a user ID of -2. The owner of an NIS+ object is typically the NIS+ principal who created it. However, you can change the owner of an NIS+ object with the nischown(1) command. The group is the NIS+ group that owns the object. NIS+ groups are stored in the groups_dir subdirectory under each domain directory. An NIS+ domain typically has an admin group consisting of the NIS+ principals who administer the domain. Not every NIS+ object has a group owner. For more information on NIS+ groups, type man 1 nisgrpadm at the HP-UX prompt. The world is the group of all authenticated NIS+ principals. If you are an authenticated NIS+ principal, but you are not the owner of an object, and you are not a member of the NIS+ group that owns the object, then you will have whatever access permissions are granted to the world. Every NIS+ directory has an owner and permissions associated with it. Every table has an owner and permissions. Entries and columns in a table have all the permissions the table has, but you can assign more permissions to an entry or column than the table has. An entry’s owner and group owner may be different from the owner and group owner of the table to which the entry belongs. When an NIS+ object is created, it inherits a default owner and permissions. Most NIS+ commands have an option for overriding these defaults. You can also change these defaults. Type man 1 nisdefaults at the HP-UX prompt for more information. After an NIS+ object has been created, you can change its owner with the nischown(1) command, its group owner with the nischgrp(1) command, and its permissions with the nischmod(1) command. An NIS+ server may serve NIS clients, by running in NIS compatibility mode. NIS compatibility mode is intended as a migration tool, to allow you to migrate your servers from NIS to NIS+ without having to migrate all your clients to NIS+ at the same time. NIS compatibility mode has the following disadvantages:
If any server in an NIS+ domain is running in NIS compatibility mode, all servers for that domain must run in NIS compatibility mode. All servers in an NIS+ domain must be NIS+ servers. You cannot mix NIS servers and NIS+ servers in the same domain. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||