我的NIS报告 --添加linux client 到 NIS DOMAIN
发表于:2007-06-09来源:作者:点击数:
标签:
[size=18:504d4d7d37][b:504d4d7d37]1)LOGINNISMASTERSERVER登陆到SOLARISNIS主机[/b:504d4d7d37][/size:504d4d7d37] SystemtimeMonJun1616:00:27CST2003 Systeminfo:SunOSstar5.8Generic_108528-05sun4usparcSUNW,Ultra-5_10 Log-oninfo:richard@star rich
[size=18:504d4d7d37][b:504d4d7d37]1)LOGIN NIS MASTER SERVER 登陆到SOLARIS NIS 主机 [/b:504d4d7d37][/size:504d4d7d37]
System time Mon Jun 16 16:00:27 CST 2003
System info: SunOS star 5.8 Generic_108528-05 sun4u sparc SUNW,Ultra-5_10
Log-on info: richard @ star
richard@<star: 1> su
成为超级用户 ROOT
>domainname
yourdomain.com
root@<star: 3> vi /etc/hosts
编辑 NIS MASTER 的 HOST TABLE
192.168.1.201 star Primary NIS
192.168.1.200 moon Secondary NIS
X.X.X.X
192.168.1.216 mavericks Blade1000
192.168.1.217 spurs sf280r
192.168.1.218  
.nets sf280r
192.168.1.199 solaris86 solarisx86
192.168.1.198 rh01 redhat
linux
加入Linux 的IP 地址 和主机名。(LOGIN LINUX BOX)
1.1) Red Hat Linux Advanced Server release 2.1AS/i686 (Pensacola)
login: eda
Password:
Last login: Mon Jun 16 16:41:17 on :0
[root@rh01 eda]# tcsh
[eda@rh01 eda]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:05:5D:62:12:E4
inet addr:192.168.1.198 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10162 errors:0 dropped:0 overruns:0 frame:0
TX packets:6237 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12735963 (12.1 Mb) TX bytes:413551 (403.8 Kb)
Inter
rupt:11 Base address:0xc400
[b:504d4d7d37]2)Login Linux BOX 登陆到LINUX 主机[/b:504d4d7d37]
Red Hat Linux Advanced Server release 2.1AS/i686 (Pensacola)
login: eda
Password:
Last login: Mon Jun 16 16:41:17 on :0
[eda@rh01 eda]$ su
Password:
2.1)编辑 linux HOSTS table vi /etc/hosts
# Valid entries are
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 rh01 localhost.localdomain localhost
192.168.1.198 rh01
192.168.1.201 star nis matser --把NIS MASTER 和SALVE 都加进来。
192.168.1.200 moon nis salve
2.2)编辑 /etc/yp.conf
vi /etc/yp.conf
# /etc/yp.conf - ypbind configuration file
# Valid entries are
#
#domain NISDOMAIN server HOSTNAME
# Use server HOSTNAME for the domain NISDOMAIN.
#
#domain NISDOMAIN broadcast
# Use broadcast on the local net for domain NISDOMAIN
#
#ypserver HOSTNAME
# Use server HOSTNAME for the local domain. The
# IP-address of server must be listed in /etc/hosts.
#
ypserver 192.168.1.201 ----- 加入 YP MATER 的 IP
2.3)编辑/etc/nsswitch.conf
[root@rh01 etc]# vi /etc/nsswitch.conf
[root@rh01 etc]# more /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# nisplus or nis+ Use NIS+ (NIS version 3)
(这里去掉#) nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
#
# To use db, put the "db" in front of "files" for entries you w
ant to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
passwd: nis files
shadow: nis files
group: nis files
#hosts: db files nisplus nis dns
hosts: nis files
2.4) 加入DOMAIN NAME
/bin/domainname yourdomain.com
2.5) 启动PORTMAP
cd /etc/rc.d/init.d/
[root@rh01 init.d]# ./portmap status
portmap (pid 610) is running...
2.6) 启动YPBIND 。。。。
[root@rh01 init.d]# ./ypbind start
Binding to the NIS domain: [ OK ]
Listening for an NIS domain server.
[root@rh01 init.d]#
2.7)
测试YP SERVER
[root@rh01 init.d]# ypwhich
star
[root@rh01 etc]# ping spurs
PING spurs (192.168.1.217) from 192.168.1.198 : 56(84) bytes of data.
64 bytes from spurs (192.168.1.217): icmp_seq=0 ttl=255 time=814 usec
64 bytes from spurs (192.168.1.217): icmp_seq=1 ttl=255 time=147 usec
ypcat hosts
[root@rh01 etc]# ypcat hosts
192.168.1.198 rh01 redhat linux
192.168.1.201 star Primary NIS
192.168.1.216 mavericks Blade1000
192.168.1.199 solaris86 solarisx86
192.168.1.216 mavericks Blade1000
127.0.0.1 localhost
192.168.1.217 spurs sf280r
192.168.1.212 hawks Sf280r
192.168.1.200 moon Secondary NIS
[b:504d4d7d37]3)登陆SOLARIS YP MASTER[/b:504d4d7d37]
3.1) System time Mon Jun 16 17:31:59 CST 2003
System info: SunOS star 5.8 Generic_108528-05 sun4u sparc SUNW,Ultra-5_10
Log-on info: richard @ star
richard@<star: 1> ping rh01
rh01 is alive
richard@<star: 2> rsh rh01
Password:
Last login: Mon Jun 16 18:14:18 from nets
No directory /export/home2/richard!
Logging in with home = "/".
root: Command not found.
root: Undefined variable.
[richard@rh01 /]$ pwd
/
[richard@rh01 /]$ ls
bin dev home lib misc opt root tmp var
boot etc initrd lost+found mnt proc sbin usr
[richard@rh01 /]$
到这里LINUX YP client 就算成了。。
3.2)但是SOLARIS 上的用户 RLOGING 到LINUX 上会说 NO HOME DIRECOTORY
所以要把 SOLARIS 上的 HOME DIRECOTRY MOUNT 到 LINUX 上来。
LOGIN LINUX
mount -t nfs moon:/export/home2 /export/home2/
在LINUX 上 MOUNT 好SOLARIS HOME 之后在 RLOGIN
richard@<star: 3> rsh rh01
Password:
Last login: Mon Jun 16 18:29:02 from star
[richard@rh01 ~]$ pwd
/export/home2/richard
就OK了。。。
不过最好都做成AUTOFS 和 AUTO HOME
AUTOFS 和 AUTO HOME 下次再写。。
MMMMN:我的东西写完了。8-(
BSD client 有点难。。加密不样。。。RLOGIN 不进。。
下次 补上。。
diag 回复于:2003-06-17 09:13:30
|
RACE ,我写的这么好。你也不给我加个原创什么的。。??
|
laoxia 回复于:2003-06-17 09:21:52
|
掌声响起来
|
diag 回复于:2003-06-17 09:22:49
|
不太响。。。继续~~~
|
houji 回复于:2003-06-17 11:01:48
|
clap hands ,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,
|
mmhh516 回复于:2003-06-17 11:10:06
|
啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,啪啪啪,
|
hope365 回复于:2003-06-17 11:51:42
|
好文章,坚决不加精!
|
cuiy 回复于:2003-06-17 12:40:32
|
diag,恭喜你,出愿创的的精华了
还有个问题,顺便问一下
我的nis client机器上做了个测试,把clent的passwd,shadow该了一下名字,机器启动不了了
看到有份资料这么说,我就试了试,结果。。。,
|
diag 回复于:2003-06-17 12:46:54
|
nsswitch.conf
passwd nis files
group nis files
shadow nis files
照这个改。。。
|
cuiy 回复于:2003-06-17 12:48:54
|
client 启动不了啊
|
diag 回复于:2003-06-17 13:05:56
|
boot cdrom -s
single user mode ..
改回来呀。。。
|
sunmarmot 回复于:2003-06-17 16:59:09
|
鼓掌!!!!!你的处女作诞生了
|
cuiy 回复于:2003-06-17 17:03:23
|
[quote:b6fafa505f="diag"]boot cdrom -s
single user mode ..
改回来呀。。。[/quote:b6fafa505f]
忘了说了,感这么做的测试,肯定是在x86上的。
刚才出去了。
|
mmmmn 回复于:2003-06-17 17:09:15
|
小小的打击你一下,nis和nis+将逐渐不被支持了,没前途的知识,嘿嘿
|
cuiy 回复于:2003-06-17 17:24:24
|
mm老大,谢谢,我知道
只是看到有地方那么写,心里有些疑惑,就测试了一下,结果被套住了
|
xingjixingji 回复于:2003-06-20 00:49:18
|
a
|
williamw2000 回复于:2003-09-29 01:38:40
|
diag, well done!
Did you ever think about "LOGIN NIS+ MASTER SERVER 登陆到SOLARIS NIS+ 主机"(Not NIS compatible)?
|
原文转自:http://www.ltesting.net