Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
4.  Configuring NIS+ With Scripts Populating the New Subdomain's Tables Populating the Master Server Tables  Previous   Contents   Next 
   
 

How to Populate the Tables From Files

To populate master server tables from files, type the following commands.

client2# nispopulate -F -p /nis+files -d sales.doc.com.
NIS+ domain name : sales.doc.com.
Directory Path : /nis+files
Is this information correct? (type 'y' to accept, 'n' to change

How to Populate the Tables From NIS Maps

To populate master server tables from NIS maps, type the following commands.

client2# nispopulate -Y -d sales.doc.com. -h businessmachine -a 
 IP_addr_of_NIS_server -y business.doc.com.
NIS+ Domain name : sales.doc.com.
NIS (YP) domain : business.doc.com.
NIS (YP) server hostname : businessmachine
Is this information correct? (type 'y' to accept, 'n' to change)

See "How to Populate the Root Master Server Tables" for additional information.

Creating Subdomain Replicas

The same principles that apply to root domain replicas apply to subdomain replicas (see "Creating a Root Replica Server").

You use the same procedure to create a subdomain replica as you do to create a root replica. The major difference between creating the root replica and a subdomain replica is that the machine you are going to convert to a subdomain replica remains a client of the domain above the one it serves as a replica. This example shows you only what you type to create a replica for the new domain. For the rest of the script's output, see "How to Create a Root Replica".

Prerequisites to Running nisserver

Before you can run nisserver to create a replica:

  • The domain must have already been configured and its master server must be running.

  • The domain's tables must be populated. (At a minimum, the hosts table must have an entry for the new client machine.)

  • You must have initialized the client machine in the parent domain.

  • You must have started rpc.nisd on the client.

  • You must be logged in as root on the master server. In this example, the master machine is named client2.

Information You Need

  • The domain name

  • The client machine name (client3, in this example)

  • The superuser password for the root master server

How to Create a Replica

  • Run the nisserver -R command as superuser (root) on the NIS+ domain's master server.

client2# nisserver -R -d sales.doc.com. -h client3
This script sets up a NIS+ replica server for domain sales.doc.com.
Domain name 	::sales.doc.com.
NIS+ server :client
Is this information correct? (type 'y' to accept, 'n' to change)

In this example, client2 is the master server. The -R option indicates that a replica should be configured. The -d option specifies the NIS+ domain name (sales.doc.com. in this example). The -h option specifies the client machine (client3, in this example) that will become the replica. Notice that this machine is still a client of the doc.com. domain and not a client of the sales.doc.com. domain.

See "How to Create a Root Replica" for the rest of this script's output.

Initializing Subdomain NIS+ Client Machines

After the master server's tables have been populated from files or NIS maps, you can initialize an NIS+ client machine. This section shows you how to initialize an NIS+ client in the new domain using the nisclient script with default settings. The NIS+ client machine is a different machine from the NIS+ master server.


Note - The -i option used in "How to Initialize a New Subdomain Client Machine"does not configure an NIS+ client to resolve host names requiring DNS. You need to explicitly include DNS for clients in their name service switch files.


You use the same procedure to initialize a client in the new domain as you do to initialize a client in the root domain. This example shows you only what you would type to initialize a client for the new domain. For the rest of the script's output, see "How to Initialize a New Client Machine".

Prerequisites to Running nisclient

Before you can use the nisclient script to initialize a user:

  • The domain must have already been configured and its master server must be running.

  • The master server of the domain's tables must be populated. (At a minimum, the host's table must have an entry for the new client machine.)

  • You must have initialized a client machine in the domain.

  • You must be logged in as a user on the client machine. In this example, the user is named user1.

Information You Need

You need:

  • The domain name (sales.doc.com., in this example)

  • The default Secure RPC password (nisplus)

  • The root password of the machine that will become the client

  • The IP address of the NIS+ server (in the client's home domain) (in this example, the address of the master server, client2)

 
 
 
  Previous   Contents   Next