![]() |
![]() |
| |||||||||||||||||||||||||||||||||
Chapter 18Administering NIS+ DirectoriesThis chapter describes NIS+ directory objects and how to administer them. Note - NIS+ might not be supported in a future release. Tools to aid the migration from NIS+ to LDAP are available in the Solaris 9 operating environment (see System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)). For more information, visit http://www.sun.com/directory/nisplus/transition.html. NIS+ DirectoriesNIS+ directory objects are used to store information related to an NIS+ domain. For each NIS+ domain, there is a corresponding NIS+ directory structure. See Chapter 2, NIS+: An Introduction, for more information about NIS+ directories. For a complete description of NIS+ directory-related commands and their syntax and options, see the NIS+ man pages. Using the niscat Command With DirectoriesThe niscat -o command can be used to list the object properties of an NIS+ directory. To use it, you must have read access to the directory object itself. Listing the Object Properties of a DirectoryTo list the object properties of a directory, use niscat -o and the directory's name:
For example:
Using the nisls Command With DirectoriesThe nisls command lists the contents of an NIS+ directory. To use it, you must have read rights to the directory object. To display in terse format, use:
To display in verbose format, use:
Table 18-1 Options for the nisls Command
Listing the Contents of a Directory--TerseTo list the contents of a directory in the default short format, use one or more of the options listed below and a directory name. If you don't supply a directory name, NIS+ will use the default directory.
or
For example, this instance of nisls is entered from the root master server of the root domain doc.com.:
Here is another example entered from the root master server:
Listing the Contents of a Directory--VerboseTo list the contents of a directory in the verbose format, use the -l option and one or more of the options listed below. The -g and -m options modify the attributes that are displayed. If you don't supply a directory name, NIS+ will use the default directory.
or
Here is an example, entered from the master server of the root domain doc.com.:
The nismkdir CommandNote - This section describes how to add a nonroot server to an existing domain using the nismkdir command. An easier way to do this is with the nisserver script as described in Chapter 4, Configuring NIS+ With Scripts The nismkdir command creates a nonroot NIS+ directory and associates it with a master server. (To create a root directory, use the nisinit -r command, described in The nisinit Command. The nismkdir command can also be used to add a replica to an existing directory. There are several prerequisites to creating an NIS+ directory, as well as several related tasks. To create a directory, use:
To add a replica to an existing directory, use:
Creating a DirectoryTo create a directory, you must have create rights to its parent directory on the domain master server. First use the -m option to identify the master server and then the -s option to identify the replica, use:
This example creates the sales.doc.com. directory and specifies its master server, smaster.doc.com. and its replica, rep1.doc.com.. It is entered from the root master server.
![]() The nismkdir command allows you to use the parent directory's servers for the new directory instead of specifying its own. However, this should not be done except in the case of small networks. Here are two examples:
![]() The second example creates the sales.doc.com. directory and specifies its own master server, smaster.doc.com.
Since no replica server is specified, the new directory will have only a master server until you use nismkdir again to assign it a replica. If the sales.doc.com. domain already existed, the nismkdir command as shown above would have made salesmaster.doc.com. its new master server and would have relegated its old master server to a replica. | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||