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

ufs-file-system

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

SINGLE USER 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.

127.0.0.1zed uselocalhostant Systems’ resources is prohibited.

::1     localhost

10.1.1.1    billy-boy      loghost

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

~                                                                               / #

# Internet host table

# 127.0.0.1       localhost

::1     localhost 10.1.1.1    billy-boy      loghost

10.1.1.100 bbns01 bbns01.billyboy.com

10.1.1.101 bbns02 nbns02.billyboy.com

~

“/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.

billyboy.com

~

~

“defaultdomain” 1 line, 13 characters

root@billy-boy.billyboy.com [11] # cd /var/yp/binding/

root@billy-boy.billyboy.com [12] # ls

billyboy.com/      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   ypbind.pid

root@billy-boy.billyboy.com [13] # cd conexant.com/

root@billy-boy.bilyboy.com [14] # ls

ypservers

root@billy-boy.billyboy.com [15] # more ypservers

bbns01

bbns02

root@billy-boy.billyboy.com [16] # cd

root@billy-boy.billyboy.com [17] # sync

root@billy-boy.billyboy.com [18] # snc

snc: Command not found.

root@billy-boy.billyboy.com [19] # sync

root@billy-boy.billyboy.com [20] # reboot

syncing file systems… done

rebooting…

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