0

Is it possible to find out which hosts are using a yp server? I want to remove / update an older VM that's acting as a yp-server but it's not clear which clients are out there.

ethrbunny
  • 2,327
  • 4
  • 36
  • 72

1 Answers1

2

Problem is: ypserv normally only logs errors into the syslog. This isn't helpful for your use case.

Workaround, assuming RHEL/CentOS, other systems should be similar.

  • Check if /etc/ypserv.securenets exists and is of any help. This can include a line for every host allowed to use NIS.
  • Put ypserv into debug mode with the -d option. This should spew out a line for every connection to STDERR. See man ypserv. Warning: ypserv will not background itself in this mode. Run it in screen or similar.
  • The evil way: Prevent all connections in /etc/ypserv.securenets and look into /var/log/messages to see who wanted to connect :)
Sven
  • 97,248
  • 13
  • 177
  • 225
  • Yow. Sounds a bit draconian. I like it. "Pinch the air hose and see who turns blue." – ethrbunny Jan 26 '19 at 12:25
  • 1
    Also see https://serverfault.com/questions/336240/how-can-i-tell-which-clients-are-connecting-to-a-nis-ypserv-master-server?rq=1 – Sven Jan 26 '19 at 12:27