portmap, ypbind, ypserv and rpc.yppasswdd (in that order) are running on the server. portmap, ypbind and rpc.yppasswdd are running on the client. I have already run /usr/lib/yp/ypinit -m on the server.
The yp* commands (ypcat, yppasswd) work when run locally on the server,but when run from the client, I get domain not bound errors. eg do_ypcall: clnt_call: RPC: Timed out YPBINDPROC_DOMAIN: Domain not bound, yppasswd: can't find the master ypserver: RPC failure on NIS
The most success I've got is when explicitly specifying the server (-h option)
with ypcat which works.
Code:
NIS client (myclient) config:
rpcinfo -p myserver output:
program vers proto port
100000 2 tcp 111 rpcbind
100000 2 udp 111 rpcbind
100004 2 udp 791 ypserv
100004 1 udp 791 ypserv
100004 2 tcp 794 ypserv
100004 1 tcp 794 ypserv
100007 2 udp 794 ypbind
100007 1 udp 794 ypbind
100007 2 tcp 797 ypbind
100007 1 tcp 797 ypbind
100009 1 udp 796 yppasswdd
rpcinfo -p localhost output:
program vers proto port
100000 2 tcp 111 rpcbind
100000 2 udp 111 rpcbind
100007 2 udp 794 ypbind
100007 1 udp 794 ypbind
100007 2 tcp 797 ypbind
100007 1 tcp 797 ypbind
100009 1 udp 796 yppasswdd
/etc/yp.conf:
domain localdomain server 192.168.0.1
/etc/ypserv.conf:
dns: no
files: 30
slp: no
slp_timeout: 3600
xfr_check_port: yes
* : * : shadow.byname : port
* : * : passwd.adjunct.byname : port
/etc/nsswitch.conf:
passwd: files nis
shadow: files nis
group: files nis
hosts: files nis dns
bootparams: nisplus [NOTFOUND=return] files
ethers: files nis
netmasks: files nis
networks: files nis
protocols: files nis
rpc: files nis
services: files nis
netgroup: files nis
publickey: nis
automount: files nis
aliases: files nis
NIS Master server (myserver) config:
rpcinfo -p localhost output:
program vers proto port
100000 2 tcp 111 rpcbind
100000 2 udp 111 rpcbind
100004 2 udp 791 ypserv
100004 1 udp 791 ypserv
100004 2 tcp 794 ypserv
100004 1 tcp 794 ypserv
100007 2 udp 794 ypbind
100007 1 udp 794 ypbind
100007 2 tcp 797 ypbind
100007 1 tcp 797 ypbind
100009 1 udp 796 yppasswdd
/etc/yp.conf:
ypserver 192.168.0.1
domain localdomain server 192.168.0.1
/etc/nsswitch.conf (same as client)