Problems with NIS+ host lookup

Viktor Rosenfeld viktor at
Fri Jan 18 22:38:04 EST 2002

Hi there,

I'm using NIS+ (nisutils 1.3) on various Redhat boxen (6.2 through 7.2) 
and I'm having a problem on RH 7.2 with looking up hosts based on their 
NIS+ name.

E.g. if I have the following line in /etc/nsswitch.conf

	hosts:      files dns nisplus 

I can't telnet/ssh to hosts using their short name:

	[ipl] /users/z/viktor $ telnet mail
	telnet: mail: System error
	mail: Resolver internal error
	[ipl] /users/z/viktor $ ssh mail
	ssh: mail: System error
	[ipl] /users/z/viktor $ ldd /usr/bin/telnet => /lib/ (0x4002c000) => /usr/lib/ (0x4002f000) => /lib/ (0x40070000)
		/lib/ => /lib/ (0x40000000)
	[ipl] /users/z/viktor $ ldd /usr/bin/ssh => /lib/ (0x4002c000) => /lib/ (0x40034000) => /lib/ (0x40038000) => /usr/lib/ (0x4003b000) => /lib/ (0x40049000) => /lib/ (0x40061000) => /lib/ (0x40124000)
		/lib/ => /lib/ (0x40000000)
	[ipl] /users/z/viktor $ 

Strangly enough, ping seems to work.  On RH 7.1 (and maybe prior) ssh
also won't work with the above host line, although telnet does.

	[anno] /users/z/viktor $ ssh mail
	ssh: mail: System error
	[anno] /users/z/viktor $ ldd /usr/bin/telnet => /lib/ (0x40026000) => /usr/lib/ (0x40029000) => /lib/ (0x4006b000)
		/lib/ => /lib/ (0x40000000)
	[anno] /users/z/viktor $ ldd /usr/bin/ssh => /lib/ (0x40026000) => /lib/ (0x4002e000) => /lib/ (0x40032000) => /usr/lib/ (0x40035000) => /lib/ (0x40043000) => /usr/lib/ (0x4005a000) => /lib/ (0x40116000)
		/lib/ => /lib/ (0x40000000)

If I change the host line in /etc/nsswitch.conf to either one of

	hosts:	files dns [NOTFOUND=return] nisplus
	hosts:	files nisplus dns

Everything works as expected.  However, as it turns out, NIS+ host name
lookup is completely borked:

	[anno] /users/z/viktor $ uname
	[anno] /users/z/viktor $ hostname
	[anno] /users/z/viktor $ domainname
	[anno] /users/z/viktor $ ping
	ping: unknown host
	[anno] /users/z/viktor $ 

Contrast a SunOS machine:

	[name] ~ $ uname 
	[name] ~ $ ping
	anno is alive
	[name] ~ $ 

BTW, between RH 7.1 and RH 7.2, the glibc changed from 2.2.2 to 2.2.4.

Any ideas?

Viktor Rosenfeld
Max-Born-Institut fuer Nichtlineare Optik und Kurzzeitspektroskopie 
Max-Born-Strasse 2A, D-12489 Berlin, Germany 
E-Mail:  mailto:viktor at

More information about the linux-nisplus mailing list