Linux下NIS客户端机器不能使用普通用户(非root用户)登录!

来源:互联网 发布:卡诺普机器人编程 编辑:程序博客网 时间:2024/05/03 14:15

现象:

        Linux机器上不能使用普通用户登录,登录时等待时间很长,不能登录,

        手动挂载NIS服务端的/home目录时,出现如下错误:

        do_ypcall: clnt_call: RPC: Unable to send; errno = Network is unreachable do_ypcall

        检查发现该台机器是NIS客户机器。

解决:

       启动NIS服务器的相关服务。

         /etc/init.d/portmap start
         /etc/init.d/ypserv start
         /etc/init.d/yppasswdd start

       启动NIS客户端的相关服务。

         /etc/init.d/ypbind start

       发现启动Failed!

       检查NIS服务器的配置文件 /etc/ypserv.conf 

   # The following, when uncommented,  will give you shadow like passwords.
   # Note that it will not work if you have slave NIS servers in your
   # network that do not run the same server as you.
   
   # Host                     : Domain  : Map              : Security
   #
   # *                        : *       : passwd.byname    : port
   # *                        : *       : passwd.byuid     : port
   127.0.0.0/255.0.0.0        : *       : *                : none
   10.10.104.0/255.255.255.0  : *       : *                : none
   192.168.0.0/255.255.255.0  : *       : *                : none
   *                          : *       : *                : deny

      然后查看客户机器的IP地址,发现不在以下网段内:

10.10.104.0/255.255.255.0

192.168.0.0/255.255.255.0

    检查发现客户机器网卡eth1没启动,该网卡的IP地址在网段  192.168.0.0/255.255.255.0 内。

   于是启动网卡eth1,然后再启动客户端的NIS相关服务。

    [root@gd87 ~]# /etc/init.d/ypbind start
    Binding to the NIS domain:
    Listening for an NIS domain server.

    然后客户机器便可以使用普通用户登录。

原创粉丝点击