NIS配置auto_direct问题(1)
NIS配置auto_direct问题(1)
在虚拟机上做solaris9 NIS配置练习,有两台机器:mysun909.90)和mysun1109.110)。现将配置过程贴下:
配置主nis服务器:
# hostname
mysun90
# more /etc/hosts
127.0.0.1 localhost
192.168.9.90 mysun90 loghost
192.168.9.110 mysun110
# cd /var/yp
# cp Makefile Makefile.orig
# vi Makefile (去掉aliases)
all: passwd group hosts ipnodes ethers networks rpc services protocols \
netgroup bootparams publickey netid netmasks c2secure \
timezone auto.master auto.home ageing \
auth.attr exec.attr prof.attr user.attr audit.user
# domainname mysun.com
# echo "mysun.com" > /etc/defaultdomain
# cd /etc
# touch ethers bootparams netgroup
# echo "GMT+08:00 mysun.com" > /etc/timezone
# more /etc/auto_master
+auto_master
/net -hosts -nosuid,nobrowse
/home auto_home -nobrowse
/xfn -xfn
# vi /etc/auto_home
+auto_home
* mysun90:/export/home/&
# echo "share /export/home" >> /etc/dfs/dfstab
# /etc/init.d/nfs.server start
# share
- /export/home rw ""
# useradd -d /export/home/user4 -m user4
# vi /etc/passwd
user4:401:1::/home/user4:/bin/sh
# vi /etc/shadow
user4::::::::
# su - user4
Sun Microsystems Inc. SunOS 5.9 Generic January 2003
$ pwd
/home/user4
$ exit
# cp /etc/nsswitch.nis /etc/nsswitch.conf
# 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 <control D>
or a return on a line by itself.
next host to add: mysun90
next host to add: mysun110
next host to add: ^D
The current list of yp servers looks like this:
mysun90
mysun110
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] 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/mysun.com
There will be no further questions. The remainder of the procedure should take
5 to 10 minutes.
Building /var/yp/mysun.com/ypservers...
Running /var/yp /Makefile...
updated passwd
updated group
updated hosts
updated ipnodes
updated ethers
updated networks
updated rpc
updated services
updated protocols
updated netgroup
updated bootparams
updated publickey
updated netid
/usr/sbin/makedbm /etc/netmasks /var/yp/`domainname`/netmasks.byaddr;
updated netmasks
updated timezone
updated auto.master
updated auto.home
updated ageing
updated auth_attr
updated exec_attr
updated prof_attr
updated user_attr
updated audit_user
评论暂时关闭