Solaris Change NIS domain

{0} ok boot -s

Boot device: /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0  File and args: -s


Loading: /platform/SUNW,Sun-Fire-T200/boot_archive

Loading: /platform/sun4v/boot_archive

ramdisk-root ufs-file-system

Loading: /platform/SUNW,Sun-Fire-T200/kernel/sparcv9/unix

Loading: /platform/sun4v/kernel/sparcv9/unix

SunOS Release 5.10 Version Generic_139555-08 64-bit

Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved.

Use is subject to license terms.

os-io Booting to milestone “milestone/single-user:default”.

Hostname: billyboy

Requesting System Maintenance Mode


Root password for system maintenance (control-d to bypass):

single-user privilege assigned to /dev/console.

Entering System Maintenance Mode

# Internet host tablesu root’ succeeded for root on /dev/console

#B illyBoy Inc. uselocalhostant Systems’ resources is prohibited.

::1     localhost    billy-boy      loghost

~                                                                               / ~      root@billy-boy. [1] #

~                                                                               / #

# Internet host table

#       localhost

::1     localhost    billy-boy      loghost bbns01 bbns02


“/etc/hosts” 8 lines, 172 characters

root@billy-boy. [7] # root@billy-boy. [7] #

root@billy-boy. [7] # ypinit -c

In order for NIS to operate sucessfully, we have to construct a list of the

NIS servers.  Please continue to add the names for YP servers in order of

preference, one per line.  When you are done with the list, type a <control D>

or a return on a line by itself.



“defaultdomain” 1 line, 13 characters [11] # cd /var/yp/binding/ [12] # ls      xprt.tcp.3         xprt.ticots.3      xprt.udp.1

dbbnis/            xprt.ticlts.1      xprt.ticotsord.1   xprt.udp.2

xprt.tcp.1         xprt.ticlts.2      xprt.ticotsord.2   xprt.udp.3

xprt.tcp.2         xprt.ticlts.3      xprt.ticotsord.3 [13] # cd [14] # ls

ypservers [15] # more ypservers


bbns02 [16] # cd [17] # sync [18] # snc

snc: Command not found. [19] # sync [20] # reboot

syncing file systems… done


SC Alert: Host System has Reset

Creating new NIS maps

The initial NIS maps will be created by running

    % /usr/lib/yp/ypinit -m


This is done when setting up the NIS master server for the first time.  If you wish to add new maps to your server or remove old one, you need to edit the /var/yp/Makefile and change the all: rule. Add or remove the name of the rule, which generates the map.

If you delete a map, you also have to remove the corresponding files.

After this change, you only need to run

    % make -C /var/yp


and the maps should be created.

Updating NIS maps

If you modify the sources for the NIS maps (for example if you create a new user by adding the account to the passwd file), you need to regenerate the NIS maps. This is done by a simple

    % make -C /var/yp