Neal Lippman <[EMAIL PROTECTED]> writes: > I'm trying to sort out a strange problem with nis - or at least, I think > it's with nis. I haven't been able to find answers, including with an > earlier post hear, so I was wondering if I could locate, perhaps, > someone knowledgeable in the internal workings of nis, but I don't know > how to go about that. Anyone with suggestions? > > The problem I have is strange. I use nis for lookups for passwd, groups, > hosts, etc, so that I can keep a central database on one server in my > home LAN and not have to duplicate accounts, etc. > > The problem is with /etc/services. When I set up nsswitch.conf to use > nis for servers, some commands no longer work properly. For instance, > apt-get. If I try apt-get update or apt-get upgrade, they fail, stating > that connections to my various apt sources are refused. However, when I > edit nsswitch.conf so that servers uses the local file instead of nis, > all works fine. I've tried ltrace'ing and strace'ing apt-get to see if I > can spot where the problem lies, unsuccessfully. The same thing happens > if I try to telnet to a specific port (eg telnet mail.foo.bar pop3), but > only when services is being delivered via nis. > > I'm at a loss to figure out why this is the case. A test program to use > getservicebyname works identically regardless of whether services is > handled by nis or not. > > Any thoughts?
I'm reading a book on NIS and NFS so I suppose I'm somewhat knowlegable ;-) I had a similar problem when using nis_ldap (or something like that) after setting nisswitch.conf's services to ldap - I did not even have the services installed in the server so that is obviously why it was not working. However, if you are using the regular databases for the /etc files (services, hosts, etc), then there should be a group of "map" files that correspond to the files your NIS server exports to your clients. These are simply hash's so that the clients can quickly lookup information, such as the IP address of a host (in host.byname.db IIRC). Are all your map files created successfully? In the book, there was talk re-building the maps if you modify the files they are built from (/etc/hosts, etc). In the book, edition one, p. 58, After editing a map source file, building the map ... is done with make: cd /var/yp (editor [me!] comment: may be in another directory) make passwd (comment: Rebuilds only password map) make (comment: Rebuilds all maps that are out of date) (Hal Stern's Managing NFS and NIS, First Edition, O'Reilly, 1992) Elizabeth -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]