1832994 Members
2161 Online
110048 Solutions
New Discussion

Another NIS+ question

 
Alex Lavrov.
Honored Contributor

Another NIS+ question

Hello,

another NIS+ issue here. When I'm adding a host to NIS+ with "nisclient -co" command, I must have this host in the hosts table of NIS+, so it will know that this is a host.

My question is, that if I work with DNS and don't want to use NIS+ for name reoslution, is it possible not to insert the host to the hosts table? If tomorrow I'll change the IP of my server, I'll have to change it also in NIS+, so I don't want NIS+ store my servers with their IP addresses ..

Thanx.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Another NIS+ question

NIS has its down name resolution system. It can only work within local networks, not across the Internet.

DNS can work both within and outside local networks, so thats why a lot of people prefer it for resolution.

The tools use different methodology but can work together via the /etc/nsswitch.conf file.

If NIS is one of the options for host resolution, after say files and DNS, then after a delay NIS names should resolve.

If that doesn't work, I wonder why I see a sample NIS version of nsswitch.conf on HP-UX 11i installs.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alex Lavrov.
Honored Contributor

Re: Another NIS+ question

Hmm, but I wonder if I can not store the servers in NIS+. Because currently, I have all the clients written in NIS, and I use only DNS for resolution, so why it requires to add the hosts to hosts table?

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
A. Clay Stephenson
Acclaimed Contributor

Re: Another NIS+ question

It's actually easier to go ahead and let NIS push the hosts map but it can simply be an empty or almost empty map. Your nsswitch.conf file can be set to use DNS only although it's more robust (and faster) to have a small /etc/hosts that contains a few hosts that seldom change and then to rely upon DNS for everything else. Your search order would then be files, dns.
In your case, even though the NIS+ hosts maps are there, they will simply be ignored by the resolver client software because there is no nis entry in /etc/nsswich.conf.
If it ain't broke, I can fix that.
Alex Lavrov.
Honored Contributor

Re: Another NIS+ question

So, if I understd it right, there is no way to give up the hosts map because NIS+ needs it anyway to know his clients?
I don't give a damn for a man that can only spell a word one way. (M. Twain)