Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Naming and Directory Services (NIS+) |
Part I About Naming and Directory Services
Part II NIS+ Setup and Configuration
4. Configuring NIS+ With Scripts
NIS+ and the Service Management Facility
Modifying the /lib/svc/method/nisplus File
Creating a Sample NIS+ Namespace
Summary of NIS+ Scripts Command Lines
Prerequisites to Running nisserver to Set Up a Root Server
How to Create an NIS+ Root Master Server
How to Change Incorrect Information When Setting Up NIS+
How to Set Up a Multihomed NIS+ Root Master Server
Prerequisites to Running nispopulate to Populate Root Server Tables
How to Populate the NIS+ Root Master Server Tables
Setting Up NIS+ Client Machines
How to Initialize a New NIS+ Client Machine
Creating Additional NIS+ Client Machines
Initializing NIS+ Client Users
How to Initialize an NIS+ User
Configuring a Client as an NIS+ Server
How to Configure an NIS+ Server Without NIS Compatibility
How to Configure an NIS+ Server With NIS Compatibility
How to Configure an NIS+ Server With DNS Forwarding and NIS Compatibility
Creating Additional NIS+ Servers
Creating an NIS+ Root Replica Server
How to Create an NIS+ Root Replica
How to Set Up Multihomed NIS+ Replica Servers
How to Create a New Non-Root NIS+ Domain
Creating Additional NIS+ Domains
Populating the New NIS+ Subdomain's Tables
Prerequisites to Populating a NIS+ Subdomain's Tables
Populating the NIS+ Master Server Tables
Creating NIS+ Subdomain Replicas
Initializing NIS+ Subdomain Client Machines
How to Initialize an NIS+ Subdomain Client Machine
Initializing an NIS+ Subdomain Client Users
How to Initialize an NIS+ Subdomain User
Summary of Commands for the Sample NIS+ Namespace
5. Setting Up the NIS+ Root Domain
8. Configuring an NIS+ Non-Root Domain
10. NIS+ Tables and Information
12. Administering NIS+ Credentials
14. Administering Enhanced NIS+ Security Credentials
15. Administering NIS+ Access Rights
16. Administering NIS+ Passwords
18. Administering NIS+ Directories
20. NIS+ Server Use Customization
23. Information in NIS+ Tables
Common NIS+ Namespace Error Messages
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.
Before you run the nispopulate script to populate the new master server's tables, be sure the following prerequisites have been met.
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.
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.
Since this procedure is essentially the same as the procedure shown in How to Populate the NIS+ Root Master Server Tables, this example shows you only what you would type to populate the tables of the new sales.doc.com. domain. For more information about this procedure, see How to Populate the NIS+ 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.
The information that you need to gather depends upon whether you are populating from files or 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.
If populating from files, you need the following information.
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
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
If populating from NIS maps, you need the following information.
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.
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 NIS+ Root Master Server Tables for additional information.