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

Item Description
-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.
-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.
D Specifies that the parent directory is a DNS domain
-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 r.unning. For IP networks this means that there must be an entry in /etc/hosts for this host when nisinit is invoked.
-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.
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.
-p 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.

-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.
Y Specifies that the parent directory is a NIS version 2 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:
    • By host name
    • By broadcast
    • By cold-start file

    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 html.