[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

nisinit Command

Purpose

Initializes a workstation to be a NIS+ client.

Syntax

To Initialize a Client

nisinit [ -c [ -k key_domain ] [ -C coldstart | -H host| -B ]]

To Initialize a Root Master Server

nisinit -r

To Initialize a Parent Server

[ -p Y| D| N parent_domain_host... ]

Description

The nisinit command initializes a workstation to be an NIS+ client. As with the rpc.nisd command, you don't need any access rights to use the nisinit command, but you should be aware of its prerequisites and related tasks.

Flags

-c Initializes the machine to be a NIS+ client. There are three initialization options available: initialize by coldstart, initialize by hostname, and initialize by broadcast. The most secure mechanism is to initialize from a trusted coldstart file. The second option is to initialize using a hostname that you specify as a trusted host. The third method is to initialize by broadcast and it is the least secure method.

-Ccoldstart
Causes the file coldstart to be used as a prototype coldstart file when initializing a NIS+ client. This coldstart file can be copied from a machine that is already a client of the NIS+ namespace. For maximum security, an administrator can encrypt and encode (with uuencode(1C)) the coldstart file and mail it to an administrator bringing up a new machine. The new administrator would then decode (with uudecode), decrypt, and then use this file with the nisinit command to initialize the machine as an NIS+ client. If the coldstart file is from another client in the same domain, the nisinit command may be safely skipped and the file copied into the /var/nis directory as /var/nis/NIS_COLD_START.
-Hhostname
Specifies that the host hostname should be contacted as a trusted NIS+ server. The nisinit command will iterate over each transport in the NETPATH environment variable and attempt to contact rpcbind on that machine. This hostname must be reachable from the client without the name service running. For IP networks this means that there must be an entry in /etc/hosts for this host when nisinit is invoked.
-B
Specifies that the nisinit command should use an IP broadcast to locate a NIS+ server on the local subnet. Any machine that is running the NIS+ service may answer. No guarantees are made that the server that answers is a server of the organization's namespace. If this flag is used, it is advisable to check with your system administrator that the server and domain served are valid. The binding information can be written to the standard output using the nisshowcache command.

Note: nisinit -c will just enable navigation of the NIS+ namespace from this client. To make NIS+ your name service, modify the file /etc/nsswitch.conf to reflect that.
-kkey_domain Specifies the domain where root's credentials are stored. If it is not specified, then the system default domain is assumed. This domain name is used to create the /var/nis/NIS_COLD_START file.
-pY|D|Nparent_domain host... Initialize on a root server a /var/nis/data/parent.object to make this domain a part of the namespace above it. Only root servers can have parent objects. A parent objects describes the namespace above the NIS+ root. If this is an isolated domain, this flag should not be used. The argument to this flag tells the command what type of name server is serving the domain above the NIS+ domain. When clients attempt to resolve a name that is outside of the NIS+ namespace, this object is returned with the error NIS_FOREIGNNS indicating that a namespace boundary has been reached. It is up to the client to continue the name resolution process.

The parameter "parent_domain" is the name of the parent domain in a syntax that is native to that type of domain. The list of host names that follow the domain parameter are the names of hosts that serve the parent domain. It there is more than one server for a parent domain, the first host specified should be the master server for that domain.

Y
Specifies that the parent directory is a NIS version 2 domain.
D
Specifies that the parent directory is a DNS domain.
N parent_domain_host...
Specifies that the parent directory is another NIS+ domain. This flag is useful for connecting a pre-existing NIS+ subtree into the global namespace.
-r Initializes the machine to be a NIS+ root server. This flag creates the file /var/nis/data/root.object and initializes it to contain information about this machine. It uses the sysinfo(2) system call to retrieve the name of the default domain.

Examples

  1. To initialize a client, use:

    nisinit -c -B
    nisinit -c -H hostname
    nisinit -c -C filename
  2. To initialize a root master server, use:

    nisinit -r

    Initializing a Client

  3. You can initialize a client in three different ways:

    Note:Each way has different prerequisites and associated tasks. For instance, before you can initialize a client by host name, the client's /etc/hosts file must list the host name you will use and nsswitch.conf file must have files as the first choice on the hosts line. Complete instructions for each method, including prerequisites and associated tasks, are provided in Initializing an NIS+ Client . Following is a summary of the steps that use the nisinit command.
  4. To initialize a client by host name, use the -c and -H options, and include the name of the server from which the client will obtain its cold-start file:

    nisinit -c -H hostname
  5. To initialize a client by cold-start file, use the -c and -C options, and provide the name of the cold-start file:

    nisinit -c -C filename
  6. To initialize a client by broadcast, use the -c and -B options:

    nisinit -c -B

    Initializing the Root Master Server

  7. To initialize the root master server, use the nisinit -r command:

    nisinit -r

Files

/var/nis/NIS_COLD_START This file contains a list of servers, their transport addresses, and their Secure RPC public keys that serve the machine's default domain.
/var/nis/data/root.object This file describes the root object of the NIS+ namespace. It is standard XDR-encoded NIS+ directory object that can be modified by authorized clients using the nis_modify() interface.
/var/nis/data/parent.object This file describes the namespace that is logically above the NIS+ namespace. The most common type of parent object is a DNS object. This object contains contact information for a server of that domain.
/etc/hosts Internet host table.

Related Information

The nisclient command, and nisshowcache command.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]