成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

NIS配置auto_direct問(wèn)題

運(yùn)維 系統(tǒng)運(yùn)維
在虛擬機(jī)上做solaris9 NIS配置練習(xí),有兩臺(tái)機(jī)器:mysun90(9.90)和mysun110(9.110)。現(xiàn)將配置過(guò)程貼下.

在虛擬機(jī)上做solaris9 NIS配置練習(xí),有兩臺(tái)機(jī)器:mysun90(9.90)和mysun110(9.110)。現(xiàn)將配置過(guò)程貼下:

配置主nis服務(wù)器:

# 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[[5983]]: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

#p#

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


# /usr/lib/netsvc/yp/ypstart
starting NIS (YP server) services: ypserv ypbind ypxfrd rpc.yppasswdd rpc.ypupdated done.

# ypwhich -m
audit_user mysun90
user_attr mysun90
prof_attr mysun90
exec_attr mysun90
auth_attr mysun90
ageing.byname mysun90
auto.home mysun90
auto.master mysun90
timezone.byname mysun90
netmasks.byaddr mysun90
netid.byname mysun90
bootparams mysun90
netgroup.byhost mysun90
netgroup.byuser mysun90
netgroup mysun90
protocols.byname mysun90
protocols.bynumber mysun90
services.byservicename mysun90
services.byname mysun90
rpc.bynumber mysun90
networks.byaddr mysun90
networks.byname mysun90
ethers.byname mysun90
ethers.byaddr mysun90
ipnodes.byaddr mysun90
publickey.byname mysun90
ipnodes.byname mysun90
hosts.byaddr mysun90
hosts.byname mysun90
group.bygid mysun90
group.byname mysun90
passwd.byuid mysun90
passwd.byname mysun90
ypservers mysun90

# ypwhich
mysun90

# ypcat auto.home
mysun90:/export/home/&

# ypcat hosts
127.0.0.1       localhost
192.168.9.110    mysun110
192.168.9.90    mysun90 loghost
192.168.9.90    mysun90 loghost

# ypcat passwd
noaccess:NP:60002:60002:No Access User:/:
nobody4:NP:65534:65534:SunOS 4.x Nobody:/:
nobody:NP:60001:60001:Nobody:/:
listen:*LK*:37:4:Network Admin:/usr/net/nls:
daemon:NP:1:1::/:
user4::101:1::/home/user4:/bin/sh
smmsp:NP:25:25:SendMail Message Submission Program:/:
nuucp:NP:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
uucp:NP:5:5:uucp Admin:/usr/lib/uucp:
root:Xv9/n7/cT8jBo:0:1:Super-User:/:/sbin/sh
sys:NP:3:3::/:
bin:NP:2:2::/usr/bin:
adm:NP:4:4:Admin:/var/adm:
lp:NP:71:8:Line Printer Admin:/usr/spool/lp:

配置從nis服務(wù)器:

# hostname
mysun110

# vi /etc/hosts
127.0.0.1       localhost
192.168.9.110    mysun110         loghost
192.168.9.90    mysun90         


# domainname mysun.com

# cd /etc

# domainname > defaultdomain

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

# cp nsswitch.nis nsswitch.conf

# /usr/lib/netsvc/yp/ypstart
starting NIS (YP server) services: ypbind done.

# ypwhich
mysun90

# ypinit -s mysun90

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
a few minutes, to copy the data bases from mysun90.
Transferring audit_user...
Transferring user_attr...
Transferring prof_attr...
Transferring exec_attr...
Transferring auth_attr...
Transferring ageing.byname...
Transferring auto.home...
Transferring auto.master...
Transferring timezone.byname...
Transferring netmasks.byaddr...
Transferring netid.byname...
Transferring bootparams...
Transferring netgroup.byhost...
Transferring netgroup.byuser...
Transferring netgroup...
Transferring protocols.byname...
Transferring protocols.bynumber...
Transferring services.byservicename...
Transferring services.byname...
Transferring rpc.bynumber...
Transferring networks.byaddr...
Transferring networks.byname...
Transferring ethers.byname...
Transferring ethers.byaddr...
Transferring ipnodes.byaddr...
Transferring publickey.byname...
Transferring ipnodes.byname...
Transferring hosts.byaddr...
Transferring hosts.byname...
Transferring group.bygid...
Transferring group.byname...
Transferring passwd.byuid...
Transferring passwd.byname...
Transferring ypservers...

#p#

mysun110's nis data base has been set up

without any errors.
#

# /usr/lib/netsvc/yp/ypstop

# /usr/lib/netsvc/yp/ypstart
starting NIS (YP server) services: ypserv ypbind done.

# ypwhich -m
audit_user mysun90
user_attr mysun90
prof_attr mysun90
exec_attr mysun90
auth_attr mysun90
ageing.byname mysun90
auto.home mysun90
auto.master mysun90
timezone.byname mysun90
netmasks.byaddr mysun90
netid.byname mysun90
bootparams mysun90
netgroup.byhost mysun90
netgroup.byuser mysun90
netgroup mysun90
protocols.byname mysun90
protocols.bynumber mysun90
services.byservicename mysun90
services.byname mysun90
rpc.bynumber mysun90
networks.byaddr mysun90
networks.byname mysun90
ethers.byname mysun90
ethers.byaddr mysun90
ipnodes.byaddr mysun90
publickey.byname mysun90
ipnodes.byname mysun90
hosts.byaddr mysun90
hosts.byname mysun90
group.bygid mysun90
group.byname mysun90
passwd.byuid mysun90
passwd.byname mysun90
ypservers mysun90

# ypcat hosts
127.0.0.1       localhost
192.168.9.110    mysun110
192.168.9.90    mysun90 loghost
192.168.9.90    mysun90 loghost

# ypcat -k ypservers
mysun110
mysun90

# su - user4
No directory!

重啟兩臺(tái)機(jī)器后繼續(xù)。

回到主nis服務(wù)器:

# cd /var/yp

# vi Makefile

--------------------(目標(biāo)all域)

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 auto.direct

---------------------------------------------------------------(第3域)
auto.direct.time:  $(DIR)/auto_direct
            -@if [ -f $(DIR)/auto_direct ]; then \
                      sed -e "/^#/d" -e s/#.*$$// $(DIR)/auto_direct \
                      | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto.direct; \
                      touch auto.direct.time; \
                     echo "updated auto.direct"; \
                     if [ ! $(NOPUSH) ]; then \
                              $(YPPUSH) auto.direct; \
                              echo "pushed auto.direct"; \
                     else \
                      : ; \
                      fi \
            else \
                      echo "couldn't find $(DIR)/auto_direct"; \
             fi
---------------------------------------------------------------(第4域)


auto.master: auto.master.time
auto.home: auto.home.time
auto.direct: auto.direct.time
auth.attr:auth.attr.time

$(DIR)/auto_master:
$(DIR)/auto_home:
$(DIR)/auto_direct:
$(PWDIR)/shadow:

# vi /etc/auto_master
+auto_master
/net            -hosts          -nosuid,nobrowse
/home           auto_home       -nobrowse
/xfn            -xfn
/-              auto_direct     -nosuid


# vi /etc/auto_direct
/usr/share/man  -ro     mysun90:/usr/share/man2

在兩臺(tái)機(jī)器上進(jìn)行:

# mv /usr/share/man /usr/share/man2

回到主nis服務(wù)器:

# echo "share -o ro /usr/share/man2" >> /etc/dfs/dfstab

# shareall

# share
-               /export/home   rw   ""  
-               /usr/share/man2   ro   ""

# /usr/lib/netsvc/yp/ypstop

# /usr/lib/netsvc/yp/ypstart
starting NIS (YP server) services: ypserv ypbind ypxfrd rpc.yppasswdd rpc.ypupdated done.


# cd /var/yp

#  /usr/ccs/bin/make
updated netid
pushed netid
updated auto.master
pushed auto.master
updated auto.direct
^C
*** auto.direct.time removed.

切換到從nis服務(wù)器)

# /usr/lib/netsvc/yp/ypxfr auto.direct

# ypwhich
mysun90

回到主nis服務(wù)器)

# cd /var/yp

#  /usr/ccs/bin/make
updated netid
pushed netid
updated auto.direct
pushed auto.direct

#p#

分別重啟兩臺(tái)機(jī)器:

# init 6

回到主nis服務(wù)器:

# su - user4
Sun Microsystems Inc.   SunOS 5.9       Generic January 2003
$ pwd
/home/user4
$ man ls
Reformatting page.  Please Wait... done

User Commands                                               ls(1)

NAME
     ls - list contents of directory

SYNOPSIS
     /usr/bin/ls [-aAbcCdfFghilLmnopqrRstux1@] [file...]

     /usr/xpg4/bin/ls [-aAbcCdfFghilLmnopqrRstux1@] [file...]

DESCRIPTION
     For each file that is a directory, ls lists the contents  of
     the  directory.  For  each file that is an ordinary file, ls
     repeats its name and any other  information  requested.  The
     output is sorted alphabetically by default. When no argument
     is given, the current  directory  is  listed.  When  several
。。。 直接映射正常。

回到從nis服務(wù)器:

# su - user4
Sun Microsystems Inc.   SunOS 5.9       Generic January 2003
$ pwd
/home/user4
$ man ls
No manual entry for ls.

【編輯推薦】

  1. 在RHEL 5中配置NIS服務(wù)器端及客戶(hù)端
  2. RHEL上NIS網(wǎng)絡(luò)信息服務(wù)配置實(shí)例講解
  3. RHEL5.1主/從NIS服務(wù)器配置及測(cè)試 
責(zé)任編輯:龐桂玉 來(lái)源: ChinaUnix
相關(guān)推薦

2009-09-17 13:27:30

SolarisNFSNIS

2009-09-11 08:49:09

linuxNIS服務(wù)linux配置

2009-09-17 15:11:33

NIS簡(jiǎn)介

2009-10-09 17:18:13

RHEL配置NIS

2009-09-17 17:37:05

Nis服務(wù)器

2016-03-22 10:22:28

AutoLayout處理IOS

2015-07-29 10:18:35

Direct Cons虛擬化

2009-09-17 18:05:51

Nis服務(wù)器

2009-09-17 13:15:12

NIS函數(shù)庫(kù)

2009-09-17 18:08:48

Nis服務(wù)器

2009-09-17 13:04:00

2011-08-24 18:19:01

2009-09-17 13:23:22

NIS服務(wù)器

2009-09-17 13:13:46

AIXNIS

2009-09-17 18:07:51

Nis服務(wù)器

2009-09-17 18:04:42

Nis服務(wù)器

2009-09-17 18:09:53

Nis服務(wù)器

2009-09-16 15:37:10

2022-11-14 23:20:20

Windows 10Windows 11微軟

2009-09-16 15:44:25

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)

主站蜘蛛池模板: 久久亚洲国产 | 久久精品国产99国产 | 成人精品一区二区三区中文字幕 | 久久久久久久久久久福利观看 | 亚洲国产精品久久久久 | 中文字幕99 | 麻豆精品一区二区三区在线观看 | 男女羞羞视频免费 | 日韩在线播放第一页 | 国产中文字幕网 | 日韩成人影院在线观看 | 久久一区精品 | 国产一区二区三区在线免费观看 | 亚洲欧美日韩国产 | 日本在线视 | 精品久久久网站 | 美女国产 | 国产不卡视频在线 | 日韩在线视频一区 | 一区二区高清 | 亚洲国产高清在线观看 | 欧美狠狠操 | 成人在线视频看看 | 欧美aⅴ| 综合久久99 | 亚洲理论在线观看电影 | 国产一区二区精品在线 | 久久久久久久av | 国产激情三区 | 日韩成人 | 久久久久久久av | 中文字幕亚洲视频 | 亚洲高清视频一区二区 | 成人妇女免费播放久久久 | 99热视 | 成人国产精品久久久 | 91av在线电影 | 日日干日日 | 久久久久久免费毛片精品 | 精品国产欧美一区二区三区成人 | 日韩精品一区二区三区在线播放 |