How do I set up a Mac as a NIS client?

I'd like to load some automounter maps from NIS. I don't need to set up authentication, I just want to enable NIS as a data source, and hook it up the automounter.

$ cd etc
$ grep + /etc/auto_master
+auto_master  # Use directory service
$ ypcat -k auto_master
No such map auto_master. Reason: Request arguments bad
$ ypwhich
can't clntudp_create: Can't communicate with ypbind

P.S. I would like to create a new NIS tag, but I can't yet.

I found this: still trying it: https://superuser.com/questions/163807/setting-up-nis-nfs-on-mac-os-10-6

Not sure if I need to reboot after using DirectoryUtility.app


Solution 1:

I just set the domain name once as root (using sudo) and launchd has launched ypbind for me ever since. The man pages for yp and ypbind might come in handy.

Is /etc/defaultdomain set? You could issue a ypbind -ypset to see if any servers are responding but it's better to have a list of masters and slaves laid out in /private/var/yp/binding/DOMAINNAME.ypservers