亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 4070 | 回復(fù): 7
打印 上一主題 下一主題

NIS配置auto_direct問(wèn)題 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2008-10-27 23:59 |只看該作者 |倒序?yàn)g覽
在虛擬機(jī)上做solaris9 NIS配置練習(xí),有兩臺(tái)機(jī)器:mysun90(9.90)和mysun110(9.110),F(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: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

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

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

分別重啟兩臺(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.

沒有man頁(yè)面。請(qǐng)教各位兄弟,這是什么原因?

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2008-10-28 23:45 |只看該作者
太繞彎。。。你把/usr/share/man移到/usr/share/man2,然后從主nis上共享出來(lái),希望通過(guò)本地的auto_direct來(lái)mount成/usr/share/man。在主的上面試了可以,從的上不行,是么?

把主nis和從nis的df -kF nfs的結(jié)果輸出來(lái)看看?
或者你的/etc/mnttab。

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2008-10-29 10:44 |只看該作者
hosts文件好像也要修改,最后還要加一行,具體是什么,我搞忘了。你自己找一下吧。我以前配置過(guò)。auto_home這些都很正常。

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2008-10-30 09:47 |只看該作者

回復(fù) #2 anfield 的帖子

是啊是啊,正是你說(shuō)的情況。從nis機(jī)器里的mnttab里沒有auto_direct,如下:

主nis機(jī)器:
# ypcat auto.direct
-ro     mysun90:/usr/share/man2
# 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
$ grep auto.direct /etc/mnttab
auto_direct     /usr/share/man  autofs  direct,nosuid,ignore,dev=3100004        1225330914
$


從nis機(jī)器:
# ypcat auto.direct
-ro     mysun90:/usr/share/man2
# su - user4
Sun Microsystems Inc.   SunOS 5.9       Generic January 2003
$ pwd
/home/user4
$ man ls
No manual entry for ls.
$ grep auto.direct /etc/mnttab
$

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2008-10-31 22:52 |只看該作者
在從nis上
看看下面的命令的輸出

#ypwhich
#ypcat auto_direct

先用手工試試能不能mount上。
還可以到/var/adm下查查messages,看看有沒有相關(guān)的錯(cuò)誤信息。

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2008-11-01 00:01 |只看該作者

回復(fù) #5 anfield 的帖子

手動(dòng)mount正常。
# ypwhich
mysun90
# ypcat auto_direct
no such map in server's domain
# ypwhich -m
auto.direct mysun90
mail.byaddr mysun90
mail.aliases mysun90
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

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2008-11-01 03:39 |只看該作者
看看這個(gè)帖子有沒有幫助
http://groups.google.com/group/c ... ad/f86beaae8db8aca7
基本上的意思就是NIS的auto_master map里不應(yīng)該有"+auto_master",而只在NIS client端本地的auto_master中引用,用于調(diào)用NIS的map。

可以試試

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2008-11-01 13:10 |只看該作者

回復(fù) #7 anfield 的帖子

非常感謝。!問(wèn)題已經(jīng)得到解決。
# ypwhich
mysun90
# ypcat auto_direct
no such map in server's domain
# 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
     arguments   are   given,  the  arguments  are  first  sorted
# 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
     arguments   are   given,  the  arguments  are  first  sorted
$ exit
# ypwhich
mysun90
# ypcat auto_direct
no such map in server's domain
#
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP