Operating System - HP-UX
1824725 Members
3704 Online
109674 Solutions
New Discussion юеВ

nis server not registered at <host> error with yppush

 
SOLVED
Go to solution
Mike King_7
Advisor

nis server not registered at <host> error with yppush

After making a change to the /etc/passwd file on my NIS master server and trying to push the change to the client, I get the following error using yppush--
nis server not registered at
If I try to use ypmake instead of yppush, I get the same error the first time I try it, but if I reissue the ypmake, it works!!
Whats the deal?
8 REPLIES 8
G. Vrijhoeven
Honored Contributor

Re: nis server not registered at <host> error with yppush

Hi,

Check with rpcinfo -p ( host) if nis is registered.

if not

restart the nis server/client:
/sbin/init.d/nis.server stop
/sbin/init.d/nis.server start
/sbin/init.d/nis.client stop
/sbin/init.d/nis.client start

Gideon
Mike King_7
Advisor

Re: nis server not registered at <host> error with yppush

Yes, NIS is regestered if I do a rpcinfo. Also, note that when I issue the ypmake it works the second time I try it!! I thought this might be a timing thing at first, but it does not seem to matter if I wait 5 seconds or 25 minnutes, ypmake returns the error the first time I run it after updating the passwd file.
S.K. Chan
Honored Contributor

Re: nis server not registered at <host> error with yppush

Does this happen to other maps ? Meaning if you make changes to other map (eg: group or hosts) and push it out, does it give you the same error ? And the error "nis server .." , the "host" is it always the same host ? Has anyone make any changes to "ypmake" script ?
Shannon Petry
Honored Contributor
Solution

Re: nis server not registered at <host> error with yppush

This is easy, with an easy fix.

You have a map called ypservers.
Test this with
% ypcat ypservers

You have a server in this map which is not running ypserv (so not a slave).
Hence your error

To fix this, lets re-create that map.

% cd /var/yp
% echo "nis_master" >ypshosts
% echo "slave_name" >>ypshosts

If you dont have any slaves, ignore the second echo.

Now from still within the /var/yp directory
% cd `domainname`

% makedbm ../ypshosts ypservers

Now do:
% ypcat ypservers

Does the list match up? It should match the list you made in ypshosts

Now run make or ypmake, and the error should not be there!

Regards,
Shannon
Microsoft. When do you want a virus today?
Shannon Petry
Honored Contributor

Re: nis server not registered at <host> error with yppush

Just wanted to appologize for how I phrazed my first paragraph. Meant easy for me cuz I have been working with NIS for...... well..... a long long really long time.

Guess I spouted cuz this is one I didnt have to experiment with to fix! hehe Please dont take offense.

No points for this please!
Microsoft. When do you want a virus today?
S.K. Chan
Honored Contributor

Re: nis server not registered at <host> error with yppush

Shannon, good point ..
On the NIS master
=================
# cd /var/yp/
# makedbm -u ypservers >> ../nis-server-list
# cat ../nis-server-list
This list contains all the masters and slaves in your NIS environment. And Shannon is saying that there might be some hosts in this list which is not valid anymore. Am I right Shannon? And hence suggested that your recreate "ypservers". I would just edit "nis-server-list" and push it out.
# vi ../nis-server-list
==> Delete invalid host entries
# makedbm ../nis-server-list ypservers
==> Recreate the DB.
# /var/yp/ypmake
==> Now push it out. If that does not quite go, run this instead ..
# yppush -v ypservers
On the client side, check ..
# ypcat -k ypservers

Also no points on this one please .. Shannon caught it first :)

Mike King_7
Advisor

Re: nis server not registered at <host> error with yppush

I created the file you specified and then did the makedbm. when I did the
ypcat ypservers

it returned two blank lines!!!

However, ypmake now seems to work fine without errors!
S.K. Chan
Honored Contributor

Re: nis server not registered at <host> error with yppush

You need to use "-k" to print its key.
# ypcat -k ypservers