Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Network authentication using NIS fails

In our office we have a Linux server which we have been authenticating against using NIS for some years (certainly using 10.5 and 10.6). Since installing 10.7, we can no longer authenticate so logins fail.


When I use Directory Utility, it seems to be able to contact the NIS server and can list out the various maps that it can see there (eg, hosts, mounts, passwd). Using dscl, I can navigate to /NIS/object-craft.com.au/Users/bgg and my user details are all listed there correctly. This makes me believe that the NIS connection between my machine and the server is working correctly. Further to this, the automounts served from the server work perfectly.


The problem only seems to occur when I try logging in. There's a yellow alert next to the username on the login panel saying that only some network accounts are accessible.


When I try to login, in /var/log/opendirectoryd.log sees lines like:


2011-07-22 19:56:23.449 EST - failed to get YP map list


This appears to come from the file /System/Library/OpenDirectory/Modules/nis.bundle/Contents/MacOS/nis. That leads me to think that OpenDirectory isn't being updated correctly with the NIS server's address. I don't know what the mechanism is that makes that work. I've tried using odutil but that hasn't proved very useful.


Does anyone know how to get this working? I'm really stumped.


Thanks,


Ben.

Posted on Jul 23, 2011 4:06 AM

Reply
66 replies

Aug 18, 2011 12:13 PM in response to ra014620

I too thave that box checked -- on two different machines in two different labs. NIS logins don't work, and my /var/log/opendirectoryd.log files are filled with:


2011-08-18 15:11:13.051 EDT - failed to get YP map list


What are your NIS servers running off? Linux? FreeBSD? Other Macs? If you have working NIS, please let us know some more particulars about your NIS server setup -- that would be very helpful!


Thanks

Aug 18, 2011 1:37 PM in response to xegere

Our NIS master is on Solaris 10 (x86). I too am seeing the same error message as you in opendirectoryd.log

Using a network ID, I cannot login on the console but I can get in via SSH and FTP.


Here's another funny thing. I used the Directory Editor and added a hostname to the /Local/Default node and all of a sudden NIS hostname resolution is now working. At least I have a way to override DNS entries, just not with the /etc/hosts file like before.

Aug 18, 2011 5:44 PM in response to Ben Golding

After reading many posts on this site, i suspect that the NIS authentication and the /etc/hosts lookup problems may be due to the fact that, during the upgrade, the BSD package is not installed or is not properly installed. BSD does not appear in "Services" nor in "Search Path" of the Directory Utility. I read that it is possible to extract the package from the Lion Installer app. BSD.pkg can be unpacked from InstallESD.dmg.

Aug 18, 2011 9:08 PM in response to ra014620

It would sure be nice if Mac OS used plain text configuration files, not hidden away somewhere where even experienced UNIX admins have to hunt. That way, we could just check the contents of /etc/nsswitch.conf to see what order the various repositories would be checked for this stuff.


I think it's great that Mac OS is based on UNIX and tham Apple are making this info part of their marketing, but it's not enough to talk the talk: they have to walk the walk too.


While I'm at it, Apple, can we PLEASE have the option to have input focus follows mouse and no auto-raise? Is it really too much to ask?

Aug 19, 2011 8:49 AM in response to ra014620

You wrote earlier and i quote:


"After upgrading, I opened the NIS service using the Directory Utility and checked this box.

User uploaded file

After that NIS authentication started working like before, except for the hostname lookup problem"


Installing BSD.pkg did not fix the hostname lookup problem but you don't have, like everybody else contribuing to this post, the NIS authentication problem. So we don't know yet if the installation of BSD.pkg can fix the NIS authentication problem. I may be wrong but we won't know before someone tries it. I'm out of the office today so I will try that next monday.


Did you try to add BSD to the services after installing BSD.pkg?

Aug 30, 2011 1:09 PM in response to Ben Golding

Looks like Lion does not like the broadcast mechanism of NIS or considers that it is not secure. I did not specified any servers for the NIS service configuration of the Open Directory utility. The broadcast mechanism was used instead to find an NIS server.


This is what I do on my Linux boxes and this is also what I was doing under Snow Leopard on the Mac. It did not seem to be a problem under Lion since ypwhich and ypcat were running correctly, but it was a problem for the NIS authentication. Now that I added the IP addresses of all my NIS servers in the NIS service configuration, the NIS authentification works correctly. I can loggin locally and by ssh using an NIS account.


Don't use the names of the NIS servers but the IP addresses instead. Looks like dns lookup for host name does not work when ypbind starts at boot time. I had this problem and I had to boot the system in single-user mode to edit the server list and replace the names by the adresses.

Network authentication using NIS fails

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.