1820886 Members
3775 Online
109628 Solutions
New Discussion юеВ

Searching a NIS server

 
SOLVED
Go to solution
Chern Jian Leaw
Regular Advisor

Searching a NIS server

HI
Is there a way which I can search for a NIS server in a domain which I do have access to? I do not know the name/IP address of the NIS server in this particular site.

Thanks.
8 REPLIES 8
harry d brown jr
Honored Contributor
Solution

Re: Searching a NIS server

Try ypwhich

live free or die
harry
Live Free or Die
John Carr_2
Honored Contributor

Re: Searching a NIS server

Hi

ypwhich for the domain master
and ypwhich -x for the maps it controls.

cheers
John.
David Burgess
Esteemed Contributor

Re: Searching a NIS server

Hi,

I can't find a file on a client that lists the nis servers.

ypwhich will tell you which server you are talking to.

ypwhich -m will tell you which maps are coming from where.

These 3 lines in /etc/rc.config.d/namesvrs will tell you what each server is :-

NIS_MASTER_SERVER=1
NIS_SLAVE_SERVER=0
NIS_CLIENT=1

HTH,

Dave.
Chern Jian Leaw
Regular Advisor

Re: Searching a NIS server

Harry,

I tried doing ypwhich hostname to obtain the NIS server of that host. Unfortunately, the NIS server obtain does not contain the passwd or group files. Instead, the NIS server is in another machine, in which I already know its name without using ypwhich, but through a colleagues words!!

How do I obtain the central NIS server within a domain, not just as in the same subnets?

Thanks
harry d brown jr
Honored Contributor

Re: Searching a NIS server

Have you tried:

ypwhich -d domain.name.here

live free or die
harry
Live Free or Die
Mahima Kaushik_2
Frequent Advisor

Re: Searching a NIS server

Hi,
following files should lead you to the nis server.
/etc/resolv.conf
/.rhosts

Mahima
Aim high!
Brian Hackley
Honored Contributor

Re: Searching a NIS server

Hello,

To "ping" all the NIS Servers on your subnet you can use rpcinfo -b 100004 1

However, to find on other subnets if your routers won't forward the RPC broadcast, you'd have to run the command locally on those subnets.

Hope this helps,

-> Brian Hackley
p.s. I moved your posting over to the "Networking" area.
Ask me about telecommuting!
sven verhaegen
Respected Contributor

Re: Searching a NIS server

Hello

Let's try and explain this , the reason you cannot easily get a list of NIS servers from a client that isn't bound already is that it doesn't hold one , NIS is different from for instance DNS in a way that it querries for a server on the network using something like a broadcast for it's specific domain and acquires the first server to respond for it's given domain , it doesn't have a specific server IP to look for , the only way to get a list of the server would be like stated before to go looking for machines running the NIS socket port and doing RPC calls to identifying them with all disadvantages attached to that (as explained in the previous post) , if you know of a client that has already bound to a server ypwhich will tell you what server it is bound to. That can be either the master NIS server or a slave server , the only way to control this is to specify the server you want to use with the ypset option .. you can read about that in the man pages on YPSERV (nis server daemon)
...knowing one ignores a greath many things is the first step to wisdom...