2.x NIS Master server setup


System: Sun Ultra 1
OS: SunOS 5.5.1
Test Site:Postech,Dongkuk Univ.

스크립트를 1997년 2월  6일 목요일 오전 10시 14분 45초에 시작
cantor# cd /home/lsh
cantor# ls -al
총 4462
drwxr-xr-x   4 lsh      staff        512  2월  6일  10:14 .
drwxr-xr-x   6 root     root         512  2월  5일  10:34 ..
drwxr-xr-x   3 root     other        512 1995년 10월  4일 NSKit_1_2
-rw-r--r--   1 root     other         61  2월  6일  10:14 NSkit.log
-rw-r--r--   1 lsh      staff        984  2월  5일  12:03 lsh.nskit.log
-rw-r--r--   1 lsh      staff    2258944  2월  5일  11:59 nskit.tar
cantor# cd NSKit_1_2
cantor# ls -al
총 10
drwxr-xr-x   3 root     other        512 1995년 10월  4일 .
drwxr-xr-x   4 lsh      staff        512  2월  6일  10:14 ..
-rw-r--r--   1 root     other       1257 1995년 10월 24일 README
drwxr-xr-x   6 root     other        512 1995년 10월  4일 sparc
cantor# cd sparc
cantor# ls
SUNWnskta  SUNWnsktr  SUNWnsktu  patch
cantor# pkgadd -d .

The following packages are available:
  1  SUNWnskta     NSKit 1.2 AnswerBook
                   (all) 54.1.4
  2  SUNWnsktr     NIS Server for Solaris (root)
                   (sparc) 95.08.07.15.02
  3  SUNWnsktu     NIS Server for Solaris (usr)
                   (sparc) 95.08.07.15.02

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all

패키지 인스턴스 를 에서 처리중

NSKit 1.2 AnswerBook
(all) 54.1.4
      Copyright 1995 Sun Microsystems, Inc. All Rights Reserved.
            Manufactured in the United States of America.
2550 Garcia Avenue, Mountain View, California, 94043-1100 U.S.A.

This product and related documentation is protected by copyright and
distributed under licenses restricting its use, copying, distribution
and decompilation.  No part of this product or related documentation
may be reproduced in any form by any means without prior written
authorization of Sun and its licensors, if any.

Portions of this product may be derived from the UNIX(R) and Berkeley
4.3 BSD systems, licensed from UNIX Systems Laboratories, Inc. a wholly
owned subsidiary of Novell, Inc. and the University of California,
respectively.  Third party software, including font technology, in this
product is protected by copyright and licensed from Sun's suppliers.

RESTRICTED RIGHTS LEGEND:  Use, duplication, or disclosure by the
government is subject to restrictions as set forth in subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer Software clause
at DFARS 252.227-7013 and FAR 52.227-19.

Sun, Sun Microsystems, the Sun Logo, Solaris, SunOS, SunSoft, the
SunSoft Logo, ONC, NFS, OpenWindows, DeskSet, AnswerBook, SunLink,
SunView, SunDiag, NeWS, OpenBoot, OpenFonts, SunInstall, SunNet,
Solstice SunNet Manager (SNM), ToolTalk, X11/NeWS and XView are 
trademarks or registered trademarks of Sun Microsystems, Inc in 
the U.S.  and certain other countries.  OPEN LOOK is a registered 
trademark of Novell, Inc.  UNIX is a registered trademark in the 
U.S. and other countries, exclusively licensed through X/Open, Ltd.  
PostScript is a registered trademark of Adobe Systems, Inc.  All 
other product names mentioned herein are the trademarks of
their respective owners.

All SPARC trademarks, including the SCD Compliant Logo, are trademarks
or registered trademarks of SPARC International, Inc.  SPARCstation,
SPARCserver, SPARCengine, SPARCworks and SPARCompiler are licensed
exclusively to Sun Microsystems, Inc.  Products bearing SPARC
trademarks are based upon an architecture developed by Sun
Microsystems, Inc.

The OPEN LOOK(R) and Sun(TM) Graphical User Interfaces were developed
by Sun Microsystems, Inc. for its users and licensees.  Sun
acknowledges the pioneering efforts of Xerox in researching and
developing the concept of visual or graphical user interfaces for the
computer industry.  Sun holds a non-exclusive license from Xerox to the
Xerox Graphical User Interface, which license also covers Sun's
licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's
written license agreements.

The X Window System is a product of the Massachusetts Institute of
Technology.

This product incorporates technology used under license from Fulcrum
Technologies, Inc.

The installation options are as follows: 
Option:	Description:
--------------------------------------------
1. nil:    less than 1 Megabyte disk space required [slowest performance].
2. heavy:    0.78 Megabytes disk space required [best performance].

Note: If the install option which you choose below fails
      due to lack of space, try another location, or 
      choose a lower install option number.

Enter the number of an installation option from the list above (1 or 2).


Select an installation option: heavy
        ERROR: Please enter one of the following keywords: 1, 2.

Select an installation option: 2
Installation option: heavy selected.

The next request for input asks you to specify the parent directory of AnswerBook
Make sure to choose a parent directory on a file system big enough to
accommodate all the files to be moved for the INSTALL OPTION you selected.


Specify the parent of the AnswerBook home directory: /opt
 For the heavy option all files will be placed under /opt/SUNWnskta. 
Using  as the package base directory.
## 패키지 정보 처리중.
## 시스템 정보 처리중.
## 패키지 종속 검증중.
## 디스크 공간 요구 검증중.
## 이미 설치되어있는 패키지들과의 충돌여부를 확인하고 있습니다.
## setuid/setgid 프로그램 점검중.

이 패키지에는 설치과정중 수퍼 사용자 권한으로 실행될 스크립트를
가지고 있습니다.

 설치를 계속하시겠습니까? y

NSKit 1.2 AnswerBook를 로 설치중

## 1째 (전체: 1) 부분을 설치중.
/opt/SUNWnskta/index/Keys
/opt/SUNWnskta/index/index.cat
/opt/SUNWnskta/index/index.cfg
/opt/SUNWnskta/index/index.cix
/opt/SUNWnskta/index/index.dct
/opt/SUNWnskta/index/index.log
/opt/SUNWnskta/index/index.ref
[ 클래스  검증중 ]
/opt/SUNWnskta/toc/NAMESERVADMIN.ind
/opt/SUNWnskta/toc/NAMESERVADMIN.lock
/opt/SUNWnskta/toc/NAMESERVADMIN.rec
/opt/SUNWnskta/toc/SUNWab_54_1.ind
/opt/SUNWnskta/toc/SUNWab_54_1.lock
/opt/SUNWnskta/toc/SUNWab_54_1.rec
[ 클래스  검증중 ]
/opt/SUNWnskta/ps/NAMESERVADMIN/01.Adding_the_NIS_Packages
/opt/SUNWnskta/ps/NAMESERVADMIN/02.Running_the_NIS_Service
/opt/SUNWnskta/ps/NAMESERVADMIN/03.Advanced_NIS_Administration
/opt/SUNWnskta/ps/NAMESERVADMIN/Contents
/opt/SUNWnskta/ps/NAMESERVADMIN/Cover
/opt/SUNWnskta/ps/NAMESERVADMIN/Credits
/opt/SUNWnskta/ps/NAMESERVADMIN/Index
/opt/SUNWnskta/ps/NAMESERVADMIN/Preface
/opt/SUNWnskta/ps/NAMESERVADMIN/Tables
/opt/SUNWnskta/ps/NAMESERVADMIN/credits_fr
/opt/SUNWnskta/ps/NAMESERVADMIN/files_to_print
[ 클래스  검증중 ]
## 설치후 스크립트를 실행중.

가 성공적으로 설치됨.

패키지 인스턴스 를 에서 처리중

NIS Server for Solaris (root)
(sparc) 95.08.07.15.02
      Copyright 1995 Sun Microsystems, Inc. All Rights Reserved.
            Manufactured in the United States of America.
2550 Garcia Avenue, Mountain View, California, 94043-1100 U.S.A.

This product and related documentation is protected by copyright and
distributed under licenses restricting its use, copying, distribution
and decompilation.  No part of this product or related documentation
may be reproduced in any form by any means without prior written
authorization of Sun and its licensors, if any.

Portions of this product may be derived from the UNIX(R) and Berkeley
4.3 BSD systems, licensed from UNIX Systems Laboratories, Inc. a wholly
owned subsidiary of Novell, Inc. and the University of California,
respectively.  Third party software, including font technology, in this
product is protected by copyright and licensed from Sun's suppliers.

RESTRICTED RIGHTS LEGEND:  Use, duplication, or disclosure by the
government is subject to restrictions as set forth in subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer Software clause
at DFARS 252.227-7013 and FAR 52.227-19.

Sun, Sun Microsystems, the Sun Logo, Solaris, SunOS, SunSoft, the
SunSoft Logo, ONC, NFS, OpenWindows, DeskSet, AnswerBook, SunLink,
SunView, SunDiag, NeWS, OpenBoot, OpenFonts, SunInstall, SunNet,
ToolTalk, X11/NeWS and XView are trademarks or registered trademarks of
Sun Microsystems, Inc in the U.S.  and certain other countries.  OPEN
LOOK is a registered trademark of Novell, Inc.  UNIX is a registered
trademark in the U.S. and other countries, exclusively licensed through
X/Open, Ltd.  PostScript is a registered trademark of Adobe Systems,
Inc.  All other product names mentioned herein are the trademarks of
their respective owners.

All SPARC trademarks, including the SCD Compliant Logo, are trademarks
or registered trademarks of SPARC International, Inc.  SPARCstation,
SPARCserver, SPARCengine, SPARCworks and SPARCompiler are licensed
exclusively to Sun Microsystems, Inc.  Products bearing SPARC
trademarks are based upon an architecture developed by Sun
Microsystems, Inc.

The OPEN LOOK(R) and Sun(TM) Graphical User Interfaces were developed
by Sun Microsystems, Inc. for its users and licensees.  Sun
acknowledges the pioneering efforts of Xerox in researching and
developing the concept of visual or graphical user interfaces for the
computer industry.  Sun holds a non-exclusive license from Xerox to the
Xerox Graphical User Interface, which license also covers Sun's
licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's
written license agreements.

The X Window System is a product of the Massachusetts Institute of
Technology.

This product incorporates technology used under license from Fulcrum
Technologies, Inc.
Using  as the package base directory.
## 패키지 정보 처리중.
## 시스템 정보 처리중.
   5개 패키지 경로명들이 이미 적절히 설치되어 있습니다.
## 패키지 종속 검증중.
## 디스크 공간 요구 검증중.
## 이미 설치되어있는 패키지들과의 충돌여부를 확인하고 있습니다.

다음의 파일들이 이미 시스템상에 설치되어 있으며 다른 패키지들에 의해
사용되고 있습니다:
  /var/yp/binding <속성의 변화만>

모순된 파일을 설치하시겠습니까 [y,n,?,q] y
## setuid/setgid 프로그램 점검중.

이 패키지에는 설치과정중 수퍼 사용자 권한으로 실행될 스크립트를
가지고 있습니다.

 설치를 계속하시겠습니까? y

NIS Server for Solaris (root)를 로 설치중

## 1째 (전체: 1) 부분을 설치중.
/etc/init.d/yp
/var/yp/Makefile
[ 클래스  검증중 ]
/etc/rc2.d/S71yp <링크된 경로명>
[ 클래스  검증중 ]

가 성공적으로 설치됨.

패키지 인스턴스 를 에서 처리중

NIS Server for Solaris (usr)
(sparc) 95.08.07.15.02
      Copyright 1995 Sun Microsystems, Inc. All Rights Reserved.
            Manufactured in the United States of America.
2550 Garcia Avenue, Mountain View, California, 94043-1100 U.S.A.

This product and related documentation is protected by copyright and
distributed under licenses restricting its use, copying, distribution
and decompilation.  No part of this product or related documentation
may be reproduced in any form by any means without prior written
authorization of Sun and its licensors, if any.

Portions of this product may be derived from the UNIX(R) and Berkeley
4.3 BSD systems, licensed from UNIX Systems Laboratories, Inc. a wholly
owned subsidiary of Novell, Inc. and the University of California,
respectively.  Third party software, including font technology, in this
product is protected by copyright and licensed from Sun's suppliers.

RESTRICTED RIGHTS LEGEND:  Use, duplication, or disclosure by the
government is subject to restrictions as set forth in subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer Software clause
at DFARS 252.227-7013 and FAR 52.227-19.

Sun, Sun Microsystems, the Sun Logo, Solaris, SunOS, SunSoft, the
SunSoft Logo, ONC, NFS, OpenWindows, DeskSet, AnswerBook, SunLink,
SunView, SunDiag, NeWS, OpenBoot, OpenFonts, SunInstall, SunNet,
ToolTalk, X11/NeWS and XView are trademarks or registered trademarks of
Sun Microsystems, Inc in the U.S.  and certain other countries.  OPEN
LOOK is a registered trademark of Novell, Inc.  UNIX is a registered
trademark in the U.S. and other countries, exclusively licensed through
X/Open, Ltd.  PostScript is a registered trademark of Adobe Systems,
Inc.  All other product names mentioned herein are the trademarks of
their respective owners.

All SPARC trademarks, including the SCD Compliant Logo, are trademarks
or registered trademarks of SPARC International, Inc.  SPARCstation,
SPARCserver, SPARCengine, SPARCworks and SPARCompiler are licensed
exclusively to Sun Microsystems, Inc.  Products bearing SPARC
trademarks are based upon an architecture developed by Sun
Microsystems, Inc.

The OPEN LOOK(R) and Sun(TM) Graphical User Interfaces were developed
by Sun Microsystems, Inc. for its users and licensees.  Sun
acknowledges the pioneering efforts of Xerox in researching and
developing the concept of visual or graphical user interfaces for the
computer industry.  Sun holds a non-exclusive license from Xerox to the
Xerox Graphical User Interface, which license also covers Sun's
licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's
written license agreements.

The X Window System is a product of the Massachusetts Institute of
Technology.

This product incorporates technology used under license from Fulcrum
Technologies, Inc.
Using  as the package base directory.
## 패키지 정보 처리중.
## 시스템 정보 처리중.
   9개 패키지 경로명들이 이미 적절히 설치되어 있습니다.
## 패키지 종속 검증중.
## 디스크 공간 요구 검증중.
## 이미 설치되어있는 패키지들과의 충돌여부를 확인하고 있습니다.
## setuid/setgid 프로그램 점검중.

NIS Server for Solaris (usr)를 로 설치중

## 1째 (전체: 1) 부분을 설치중.
/usr/lib/netsvc/yp/mkalias
/usr/lib/netsvc/yp/multi
/usr/lib/netsvc/yp/multi.awk
/usr/lib/netsvc/yp/rpc.yppasswdd
/usr/lib/netsvc/yp/stdethers
/usr/lib/netsvc/yp/stdhosts
/usr/lib/netsvc/yp/udpublickey
/usr/lib/netsvc/yp/yppush
/usr/lib/netsvc/yp/ypserv
/usr/lib/netsvc/yp/ypxfr_1perday
/usr/lib/netsvc/yp/ypxfr_1perhour
/usr/lib/netsvc/yp/ypxfr_2perday
/usr/lib/netsvc/yp/ypxfrd
/usr/sbin/mknetid
/usr/sbin/revnetgroup
/usr/share/man/man1m/rpc.yppasswdd.1m
/usr/share/man/man1m/yppush.1m
/usr/share/man/man1m/ypserv.1m
/usr/share/man/man1m/ypxfr_1perday.1m
/usr/share/man/man1m/ypxfr_1perhour.1m
/usr/share/man/man1m/ypxfr_2perday.1m
/usr/share/man/man1m/ypxfrd.1m
/usr/share/man/man4/securenets.4
[ 클래스  검증중 ]

가 성공적으로 설치됨.

The following packages are available:
  1  SUNWnskta     NSKit 1.2 AnswerBook
                   (all) 54.1.4
  2  SUNWnsktr     NIS Server for Solaris (root)
                   (sparc) 95.08.07.15.02
  3  SUNWnsktu     NIS Server for Solaris (usr)
                   (sparc) 95.08.07.15.02

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: q

cantor# pwd
/home/lsh/NSKit_1_2/sparc
cantor# cd /var/yp
cantor# ls
Makefile   aliases    binding    nicknames
cantor# vi Makefile
#B=-b
B=

cantor# which ypinit
/usr/sbin/ypinit
cantor# yp  which ypcat
/bin/ypcat
cantor# which ypserv
no ypserv in /bin /usr/sbin /usr/bin /usr/ucb /etc . /usr/local/bin /usr/local/lib/netscape
cantor# ypinit -m

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 
or a return on a line by itself.
	next host to add:  cantor
	next host to add:  ^D
The current list of yp servers looks like this:

cantor

Is this correct?  [y/n: y]  y

Installing the YP database will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure.

Do you want this procedure to quit on non-fatal errors? [y/n: n]  
OK, please remember to go back and redo manually whatever fails.  If you
don't, some part of the system (perhaps the yp itself) won't work.
The yp domain directory is /var/yp/lsh0708
There will be no further questions. The remainder of the procedure should take
5 to 10 minutes.
Building /var/yp/lsh0708/ypservers...
Running /var/yp /Makefile...
updated passwd
updated group
updated hosts
make: 경고: 타겟 `/etc/ethers'를 어떻게 make할지 알수 없음
현 작업 디렉토리 /var/yp
updated networks
updated rpc
updated services
updated protocols
make: 경고: 타겟 `/etc/netgroup'를 어떻게 make할지 알수 없음
현 작업 디렉토리 /var/yp
make: 경고: 타겟 `/etc/bootparams'를 어떻게 make할지 알수 없음
현 작업 디렉토리 /var/yp
/var/yp/lsh0708/mail.aliases: 3 aliases, longest 10 bytes, 52 bytes total
/usr/lib/netsvc/yp/mkalias /var/yp/`domainname`/mail.aliases /var/yp/`domainname`/mail.byaddr; 
updated aliases
updated publickey
updated netid
/usr/sbin/makedbm /etc/netmasks /var/yp/`domainname`/netmasks.byaddr; 
updated netmasks
couldn't find /etc/timezone
updated auto.master
updated auto.home
make: 경고: 타겟 `all'가 오류로 인해 다시 만들어지지 않음
현 작업 디렉토리 /var/yp

cantor has been set up as a yp master server without any errors.

If there are running slave yp servers, run yppush now for any data bases
which have been changed.  If there are no running slaves, run ypinit on
those hosts which are to be slave servers.
cantor# ps -ef|grep yp
    root   815   551  0 10:18:48 pts/5    0:00 grep yp
cantor# ypwhich
ypwhich: can't communicate with ypbind
cantor# cd /usr/lib/netsvc/yp
cantor# ls
mkalias         rpc.yppasswdd   udpublickey     ypserv          ypxfr_1perhour
multi           stdethers       ypbind          ypxfr           ypxfr_2perday
multi.awk       stdhosts        yppush          ypxfr_1perday   ypxfrd
cantor# ./ypserv
cantor# ./ypbind
cantor# ./ypxfrd
cantor# ./rpc.yppasswdd  /etc/passwd -single -m
rpc.yppasswdd: specifying the password file on the command line is 
               obsolete, consider using the -D option instead.
rpc.yppasswdd: found a shadow file in the same directory as /etc/passwd
               It will be used.
rpc.yppasswdd: adjunct file -single not found
Usage:
        rpc.yppasswdd [-D directory | passwd [passwd.adjunct]]
                      [-nopw] [-nogecos]
                      [-noshell] [-m arg1 arg2 ...]
where
        directory is the directory where the passwd, shadow and/or
        passwd.adjunct files are found (/etc by default)
        It should match the setting of PWDIR in /var/yp/Makefile

        Alternatively, the old 4.1.x syntax is supported where
        passwd is the path to the passwd file
        passwd.adjunct is the patch to the passwd.adjunct file
        NOTES:
         1. The -D option and the passwd/passwd.adjunct arguments are
            mutually exclusive
         2. The old syntax deprecated and will be removed in a future
            release
         3. A shadow file found in the same directory as the passwd
            will be assumed to contain the password information

        arguments after -m are passed to make(1S) after password changes
        -nopw passwords may not be changed remotely using passwd
        -nogecos full name may not be changed remotely using passwd or chfn
        -noshell shell may not be changed remotely using passwd or chsh
cantor# ./rpc.yppasswdd
cantor# pwd
/usr/lib/netsvc/yp
cantor# ls
mkalias         rpc.yppasswdd   udpublickey     ypserv          ypxfr_1perhour
multi           stdethers       ypbind          ypxfr           ypxfr_2perday
multi.awk       stdhosts        yppush          ypxfr_1perday   ypxfrd

cantor# ypwhich
cantor
cantor# ypcat hosts
141.223.30.33   riemann.postech.ac.kr riemann
141.223.30.31   euclid.postech.ac.kr euclid
127.0.0.1       localhost
141.223.30.33   riemann.postech.ac.kr riemann
141.223.30.15   cantor loghost
141.223.30.31   euclid.postech.ac.kr euclid
141.223.30.15   cantor loghost
cantor# 


* Reboot 하면 자동적으로 NIS daemon 들이 뜬다.

cantor# ps -ef |grep yp
    root   114     1  0 10:35:34 ?        0:00 /usr/lib/netsvc/yp/ypserv -d
    root   118     1  0 10:35:35 ?        0:00 /usr/lib/netsvc/yp/ypbind
    root   126     1  0 10:35:39 ?        0:00 /usr/lib/netsvc/yp/ypxfrd
    root   131     1  0 10:35:40 ?        0:00 /usr/lib/netsvc/yp/rpc.yppasswdd -m
    root   424   336  0 10:49:18 pts/2    0:00 grep yp
cantor# 


*rpc.ypupdated 는 2.x 에서는 없어진것 같다.


*test
cantor# vi /etc/hosts
cantor# cd /var/yp
cantor# make hosts
make: 명령어가 없음
cantor# 

cantor# /usr/ccs/bin/make hosts
updated hosts


pushed hosts
cantor#