• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

NIS

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 9次 | 进入软件测试论坛讨论

领测软件测试网

客户端的使用 是重点   (基本理解 是  服务器端配置好的 用户,可以在任意 NIS客户端登陆。)

一、服务端:


1。需要安装包:
ypserv ypbind yptools

2。设置
/etc/sysconfig.network
加
NISDOMAIN=nis.rhce  (nis.rhce这个域名自己定义,是客户端 需要知道的名字)


3。domainname nis.rhce   设置NISdomain

注意区别 :
    dnsdomainname=hostname -d, domainname=hostname -y
我们常用的FQDN设置 是用:
dnsdomainname


4。修改/var/yp/Makefile(都是ypserv中的文件)
修改
all:  passwd group hosts rpc services netid protocols mail \

为
all:  passwd group  \
应该是只对密码 做验证

5。打开服务
service portmap start
service ypserv start

6.确保make包安装

7。使用ypinit 产生NIS数据库(maps)
/usr/lib/yp/ypinit -m

At this point, we have to construct a list of the hosts which will run NIS
servers.  student1.com is in the list of NIS server hosts.  Please continue to add
the names for the other hosts, one per line.  When you are done with the
list, type a <control D>.      注意:
        next host to add:  student1.com
        next host to add: 
The current list of NIS servers looks like this:

student1.com

Is this correct?  [y/n: y]  y
We need a few minutes to build the databases...
Building /var/yp/nis.rhce/ypservers...
Running /var/yp/Makefile...
gmake[1]: Entering directory `/var/yp/nis.rhce'
Updating passwd.byname...
Updating passwd.byuid...
Updating group.byname...
Updating group.bygid...
gmake[1]: Leaving directory `/var/yp/nis.rhce'

student1.com has been set up as a NIS master server.

Now you can run ypinit -s student1.com on all slave server.

8。启动NIS  password升级进程      对密码等修改的内容升级

service yppasswdd start


9.重新启动ypserv

10。确认ypserv服务运行

二、客户端

1.确认安装portmap yptools yp-bind包和authconfig包

2。确认客户端可以看到 服务端的 portmap服务

rpcinfo -p NIS服务器

3。使用 authconfig工具配置 你的客户端 做 NIS身份验证

选定
USE NIS  在“DOMAIN:”后  输入 指定的NIS域(如nis.rhce),SERVER上 输入指定的NIS服务器

4.authconfig 完成后会自动 开启ypbind服务,查看 /var/log/message是否 有错误出现


5。这里需要注意的是:

只有在服务器上/etc/passwd文件中UID>=500的用户才能做 NIS的用户。

当客户端 和服务端 同名的用户  以客户端自己的 用户密码登陆,客户端 没有 服务端有的,不能在建立和服务端同名的用户 会报用户已经存在  错误,只有关闭 ypbind才能创建。


用ypcat passwd可以看到 哪些用户 是NIS验证服务的用户

6。如果服务端 新增加 或者 修改了密码  ,需要到/var/yp/下执行make重新 生成 用户文件信息。


7。NIS只提供 验证,不提供文件共享机制。
(文件如果需要共享 可以用到NFS和autofs  具体可以参照第二本书label4)

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网