Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
4.  Configuring NIS+ With Scripts Creating a Subdomain How to Create a New Non-Root Domain  Previous   Contents   Next 
   
 

Creating Additional Domains

Repeat the preceding procedure for changing servers to master servers of new non-root domains on as many server machines as you like. Every new master server is a new domain. Plan your domain structure before you start creating an NIS+ namespace. See "Structure of the NIS+ Namespace" for more information on planning an NIS+ hierarchy.

Populating the New Subdomain's Tables

After you have created a new domain, you need to populate its master server's standard NIS+ tables. You use the same procedure to populate the new master server's tables as you used to populate the root master server's tables. The major difference is that the nispopulate script is run on the new master server instead of on the root master server. The domain names and file paths or NIS servers' names may change as well.

This example shows the tables of the new domain, sales.doc.com., being populated.

Prerequisites to Running nispopulate

Before you can run the nispopulate script to populate the new master server's tables:

  • The information in the files must be formatted appropriately for the table into which it will be loaded.

    • Before proceeding, view each local /etc file or NIS map that you will be loading data from. Make sure that there are no spurious or incorrect entries. Make sure that the right data is in the correct place and format. Remove any outdated, invalid, or corrupt entries. You should also remove any incomplete or partial entries. You can always add individual entries after configuration is completed. That is easier than trying to load incomplete or damaged entries.

    • If you are setting up a network for the first time, you may not have much network information stored anywhere. In that case, you'll need to first get the information and then enter it manually into the input file--which is essentially the same as an /etc file.

  • You should make copies of the /etc files and use the copies to populate the tables instead of the actual ones for safety reasons. (This example uses files in a directory called /nis+files, for instance.)

  • Edit four of the copied NIS table files, passwd, shadow, aliases, and hosts, for security reasons. For example, you might want to remove the following lines from the copy of your local passwd file so they are not distributed across the namespace:

root:x:0:1:0000-Admin(0000):/:/sbin/sh
daemon:x:1:3:0000-Admin(0000):/:
bin:x:3:5:0000-Admin(0000):/usr/bin:
sys:x:3:3:0000-Admin(0000):/:
adm:x:4:4:0000-Admin(0000):/var/adm:
lp:x:78:9:0000-lp(0000):/usr/spool/lp:
smtp:x:0:0:mail daemon user:/:
uucp:x:5:5:0000-uucp(0000):/usr/lib/uucp:
nuucp:x:7:8:0000-
uucp (0000):/var/spool/uucppublic:/usr/lib/uucp/uucico
listen:x:22:6:Network Admin:/usr/net/nls:
nobody:x:60000:60000:uid no body:/:
noaccess:x:60002:60002:uid no access:/:
  • The domain must have already been configured and its master server must be running.

  • The domain's servers must have sufficient disk space to accommodate the new table information.

  • You must be logged in as an NIS+ principal and have write permission to the NIS+ tables in the specified domain. In this example, you would have to be the user root on the machine client2.


Note - The nispopulate script can fail if there is insufficient /tmp space on the system. To keep this from happening, you can set the environment variable TMPDIR to a different directory. If TMPDIR is not set to a valid directory, the script uses the /tmp directory instead.


Information You Need

If populating from files, you need:

  • The new NIS+ domain name

  • The path of the appropriately edited text files whose data will be transferred

  • The root password of the NIS+ master server

If populating from NIS maps, you need:

  • The new NIS+ domain name

  • The NIS domain name

  • The NIS server's name

  • The IP address of the NIS server

  • The root password of the NIS+ master server


Note - The NIS domain name is case-sensitive, while the NIS+ domain name is not.


Populating the Master Server Tables

Since this procedure is essentially the same as the procedure shown in "How to Populate the Root Master Server Tables", this example shows you only what you would type to populate the tables of the new domain, sales.doc.com.. For more information about this procedure, see "How to Populate the Root Master Server Tables".


Note - This script should be run on the new domain's master server, not the root master server.


The alternate methods of populating the master server tables on the new master server are:

  • You can populate master server tables from files.

  • You can populate master server tables from NIS maps.

Whichever method you choose should be executed in a scrolling window as the script's output might otherwise scroll off the screen.

 
 
 
  Previous   Contents   Next