nis 客户端 unixware 卡在 id 用户上

nis 客户端 unixware 卡在 id 用户上

我在 Slackware 15 上配置了 NIS 服务器,客户端是 Unixware 7

客户端可以看到服务器

ypwhich -m passwd
slackware1.mydomain

地图没问题

ypcat passwd.byname 
milandra:***:1002:1002::/home/milandra:/bin/bash

身份证作品

 id -u milandra 1002
 id -g milandra 1002

但..

id milandra

或者

id -G milandra

卡住并等待

这是 nsswitch.conf

passwd:         files nis
shadow:         files nis
group:          files nis

hosts:          files dns nis
networks:       files nis

services:       files nis
protocols:      files nis
rpc:            files nis
ethers:         files nis
netmasks:       files nis
netgroup:       files nis
bootparams:     files nis

automount:      files nis
aliases:        files nis

可能是什么问题?

使用 tcpdump 显示 ypserv 使用的端口中 nis 服务器上的连续连接。

在 ypserv 上启用调试会返回很多类似这样的行

connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"
ypproc_first_2 from 192.168.201.2 port 34775
    domainname = "mydomain.domain"
    mapname = "group.byname"
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
connect from 192.168.201.2 port 34775 to procedure ypproc_first (mydomain.domain,group.byname;1)
    ypdb_open("mydomain.domain", "group.byname")
Found: mydomain.domain/group.byname (0)
ypdb_close() called
    -> Key = "milandra", Value = "milandra:!:1002:"

如果我在服务器上将 /etc/group.nis 设为空,则 id 可以工作,但会出现此错误

id  milandra
uid=1002(milandra) gid=1002
UX:id: WARNING: groupid not found in group database

相关内容