1835721 Members
2852 Online
110082 Solutions
New Discussion

problem with NIS slave

 
Sunny Jaisinghani
Trusted Contributor

problem with NIS slave

Hello All,

I am facing a problem with NIS slave server.

I used to login to NIS slave server with a normal user account and then sudo su - to root.

Now suddenly i am not able to login to NIS slave with normal login.

I am able to login to other NIS clients and NIS master using normal user account.

When i checked with ypwhich -m i found that NIS slave was using itself as reference for NIS maps.

I planned to copy the maps again from the master server to slave server.

1. I stopped nis.master and nis.client on SLAVE
2. reinitialised SLAVE to act as a NIS slave and copied the maps from master to slave using ypinit -s
3. then i did ypinit -c
it gave me error

ypinit -c

Usage: ypinit -m [DOM=domain_name]
ypinit -s master_server [DOM=domain_name]

-m: make this machine a master Network Information Service server
-s: make this machine a slave Network Information Service server; "master_server" is the
existing master NIS server from which the databases are copied.

"domain_name" is the NIS domain name to initialize; if not supplied, DOM
defaults to the name returned by domainname(1).



WHY ISN"T YPINIT -C NOT WORKING.

Thanks
5 REPLIES 5
Fred Ruffet
Honored Contributor

Re: problem with NIS slave

hi,

could you please tell us which version of hp-ux you're using ? (uname -a)

regards,
--

"Reality is just a point of view." (P. K. D.)
Sunny Jaisinghani
Trusted Contributor

Re: problem with NIS slave

The MASTER and SLAVE are both running HPUX 11.11
Steven E. Protter
Exalted Contributor

Re: problem with NIS slave

Shalom,

ypinit -c is not a valid the way you are using.

according to the man page ypinit -c lets you use a list of chosen NIS servers.

The exact syntax to make it work is in the man page. You need to submit the command a list.

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
Sunny Jaisinghani
Trusted Contributor

Re: problem with NIS slave

this is the extract from the man page

========================
-c Configures the local host as a NIS client, so
that the NIS client will attempt to bind to a
particular NIS server. Invocation of ypinit
with a -c option prompts the user to
construct a list of NIS servers, in the order
of preference, to which the client will try
to bind. This list of NIS servers is stored
in the file
/var/yp/binding//ypservers. In
order for ypbind to use this list of NIS
servers, ypbind should not be invoked with -
broadcast option. (see ypbind(1M) in
ypserv(1M)). If it is so desired that it is
not necessary for a NIS client to bind to a
NIS server in a particular list, the ypinit
-c installation mechanism could be ignored.

===============================

i cannot find the directory /var/yp/binding/

is there way to give the NIS server names to ypinit -c on command line itself rather than ypbind referring the file /var/yp/binding//ypservers


Also it would help me a lot if anybody can provide me a detailed step procedure to create a NIS slave and also make it work like a NIS client to itself

Thanks in advance
Sunny Jaisinghani
Trusted Contributor

Re: problem with NIS slave

I started the nis.client directly without ypinit -c

the ypbind process has started.

currently the NIS slave is referring the maps on NIS master as indicated by ypwhich -m

now i am able to login to NIS slave using normal login account after copying the maps from master to slave.

Thanks for your comments