HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

NIS update error.

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

NIS update error.

Hi All,

I am getting following errors when try to update the NIS database but we can success by terminating when error comes and running /var/yp/ypmake once again.

Ex:

1)First i am running /var/yp/ypmake

root@lgapps:/emd/home/bzlqct > /var/yp/ypmake

For NIS domain emdeng:

Building the passwd map(s)... passwd build complete.
Pushing the passwd map(s): passwd.byname

The server hangs here, then i am press "CTRL + C" to terminate (to get the prompt).

2)Then again i am running /var/yp/ypmake

root@lgapps:/emd/home/bzlqct > /var/yp/ypmake

For NIS domain emdeng:

The passwd map(s) are up-to-date.
The group map(s) are up-to-date.
The hosts map(s) are up-to-date.
The networks map(s) are up-to-date.
The rpc map(s) are up-to-date.
The services map(s) are up-to-date.
The protocols map(s) are up-to-date.
The netgroup map(s) are up-to-date.
The aliases map(s) are up-to-date.
The vhe_list map(s) are up-to-date.
The publickey map(s) are up-to-date.
Building the netid map(s)... netid build complete.
Pushing the netid map(s): netid.byname

Now the server hangs here, then again i am press "CTRL + C" to terminate (to get the prompt).

3)Then once again i am running /var/yp/ypmake

Now it is working success full.


what is the issue.

13 REPLIES
Steven Schweda
Honored Contributor
Solution

Re: NIS update error.

> Pushing the passwd map(s): passwd.byname
>
> The server hangs here, [...]

> Pushing the netid map(s): netid.byname
>
> Now the server hangs here

I know nothing, but it looks to me as if
your "push" operations all fail.

> Now it is working success full.

Well, yeah. There's nothing more to "make",
but there's no reason to believe that any of
the slave servers has gotten the new data.

Is "yppush" also successful? (I'd guess
not.)

If not, then I'd try to identify the slave
servers, and see if things are running right
on them, and if you can communicate with
them.

Or, wait longer to see if you get an actual
error, instead of only a hung "yppush".


> what is the issue.

Do you mean, "What is the _problem_?"?
Jamie A Dennis
Frequent Advisor

Re: NIS update error.

First thing I would do is go to the directory where you store your map files and see if all the map files look correct (not zero length, etc.) and which ones have been updated recently.

If none have been updated, yppush will have no work to do. If netid HAS been updated, which appears to be the case based on your information above, verify your changes, then cd /var/yp, run make netid, which will then execute yppush netid.

If this still doesn't work, please provide more data and I'll see if I can help further.

Best regards,

Jamie
"If hindsight is 20/20, why don't more people use their rearview mirrors?" - James (Jamie) A. Dennis, 1998
Steven Schweda
Honored Contributor

Re: NIS update error.

> If none have been updated, yppush will have
> no work to do.

ypmake cares about changed files. When a
source file has changed, ypmake will normally
use yppush to distribute the changed data.

yppush does _not_ care about changed data.
Unless you have no NIS maps, yppush _always_
has "work to do", and it will do it (or try
to) when asked.

> [...] which will then execute yppush netid.

Why not just run yppush manually?
Ganesan R
Honored Contributor

Re: NIS update error.

Hi Senthilkumar,

YPMAKE is to uptate the map files, if you have make any changes on the source file. What changes you have made and on which source file.

Instead of running ypmake without any argument(which builds/updates all the maps), you can run with specific maps to be updated as a argument with ypmake commnad. For example, if you have modified only user accounts(passwd file), then you can run this command.

#ypmake passwd
or
#ypmake passwd.byname

This command will update only the passwd map and update the changes to slave servers.

Finally you said,

>>Now it is working success full<<

Do you mean that the changes or updated to the NIS database ?

Best wishes,

Ganesh.
Ganesan R
Honored Contributor

Re: NIS update error.

Hi Again,

All these NIS activities like building the map files, updating the map files, notifying the slave servers about the chanes, reporting the status, etc will be taken care by NIS master daemon.

Since it is not building the maps and reporting proplerly, you can try stop and restart the NIS master daemon.
Best wishes,

Ganesh.
Steven Schweda
Honored Contributor

Re: NIS update error.

> [...] will be taken care by NIS master
> daemon.

> [...] stop and restart the NIS master
> daemon.

Ok, I'll bite. What is the "NIS master
daemon"? And what are its magical powers?
Steven Schweda
Honored Contributor

Re: NIS update error.

> [...] NIS activities like building the map
> files, updating the map files, [...]

And what are these "map files"? I know what
files are, and I have at least a vague idea
what NIS maps are, but I don't know what "map
files" are.
Ganesan R
Honored Contributor

Re: NIS update error.

Hi Steven,

>>What is the "NIS master
daemon"? And what are its magical powers?<<

Is this question to me? Do you want me to explain the daemons running on NIS master. If so here it is..

ypserv
======
An NIS server process. It runs on both master and slave NIS servers.
Its job is to listen to incoming requests and respond to them after
consulting NIS maps.

rpc.yppasswdd
==============
Runs only on NIS master servers. When a user runs the yppasswd or passwd command to change a password, this daemon updates the
password file used for building NIS password maps. It then updates the maps and pushes these to all slave servers.

rpc.updated
============
Runs on master NIS servers. This daemon is part of secure RPC. It provides a secure mechanism to update NIS source files on the
master NIS server.

ypxfrd
======
Runs on master and slave NIS servers. Its function is to transfer maps between master and slave servers.

keyserv
========
Runs on both machines. This is also a part of secure RPC and is used to keep encryption keys for all logged in users.
Best wishes,

Ganesh.
Ganesan R
Honored Contributor

Re: NIS update error.

Hi Steven,

>>And what are these "map files"? I know what files are, and I have at least a vague idea what NIS maps are, but I don't know what "map files" are<<

Do you think it is necessary to explain that the terms "NIS maps" and "map files" are same in NIS environment. After all maps are going to be files. It is understood. It is not compulsory that we should stick with one term. then from where the question comes?
Best wishes,

Ganesh.
Steven Schweda
Honored Contributor

Re: NIS update error.

> Is this question to me?

Who first mentioned the "NIS master daemon"?
Not I.

> Do you want me to explain the daemons
> running on NIS master.

No, what I wanted was what I asked, namely,
some explanation of what this mysterious "NIS
master daemon" is. I'm still waiting for
that.

> If so here it is..

And which of these is this "NIS master
daemon" to which you refer?

> Do you think it is necessary to explain
> that the terms "NIS maps" and "map files"
> are same in NIS environment.

It's necessary to me, because I didn't know
that an NIS map was actually a file. I still
don't know that. I don't believe that it's
true. Where, in which file system, can I
find one of these "map files"?

> After all maps are going to be files. It is
> understood.

Not by me. Who, other than you, understands
this?

ypcat passwd > map_file
???

> It is not compulsory that we should stick
> with one term.

It helps to use an accurate term when one
wishes to be understood. If more than one
term is accurate, then it's ok with me to use
them all. If a term makes no sense in a
particular context, then using it may be
unhelpful. Like, say, "map file".

> then from where the question comes?

From by brain (which can't figure out what's
happening in your brain).

> [...] you can try stop and restart the NIS
> master daemon.

So, now, what does this mean, exactly? I
seem to have missed the explanation (again).
Jamie A Dennis
Frequent Advisor

Re: NIS update error.

Ok, in regard to NIS maps, or map files, both terms are correct. Reference the book Managing NFS and NIS by Hal Stern, the expert on the topic.

4.2. Managing map files
Keeping map files updated on all servers is essential to the proper operation of NIS.

He goes on in the same paragraph to call the same NIS maps.

Now, back to the issue at hand - Senthil, have you had a chance to look at your maps to see what has been updated? Also, following the advice stated by the other gentlemen, try running yppush manually, but run it in verbose mode ( yppush -v ).

Best regards,

Jamie
"If hindsight is 20/20, why don't more people use their rearview mirrors?" - James (Jamie) A. Dennis, 1998
senthil_kumar_1
Super Advisor

Re: NIS update error.

Hi All,

I am new to HPUX. I have configured NIS myself in Linux but not in HPUX.

This is configured by previous UNIX admin.

As of i know, we did not configure any slave server.

Please find my some NIS configuration details and more:

# vim /etc/rc.config.d/namesvrs


NIS_MASTER_SERVER=1
NIS_SLAVE_SERVER=0
NIS_CLIENT="1"
NISPLUS_SERVER=0
NISPLUS_CLIENT=0
NIS_DOMAIN="emdeng"
MAX_NISCHECKS=2
EMULYP=""
YPSERV_OPTIONS=""
YPBIND_OPTIONS=""
YPPASSWDD_OPTIONS="/etc/passwd -m passwd PWFILE=/etc/passwd"
KEYSERV_OPTIONS=""
YPUPDATED_OPTIONS=""
YPXFRD_OPTIONS=""
RPC_NISD_OPTIONS="$EMULYP"
NIS_CACHEMGR_OPTIONS=""
YPSET_ADDR=""
WAIT_FOR_NIS_SERVER="TRUE"



#ps -ef | grep -i yp


root@lgapps:/etc/rc.config.d > ps -ef | grep -i yp
root 1282 1 0 Nov 12 ? 3:31 /usr/lib/netsvc/yp/ypbind
root 20715 1 0 Aug 5 ? 0:00 /usr/lib/netsvc/yp/rpc.yppasswdd /etc/passwd -m passwd PWFIL
root 18120 17542 0 11:52:21 pts/2 0:00 grep -i yp
root 20720 1 0 Aug 5 ? 0:00 /usr/lib/netsvc/yp/rpc.ypupdated
root 20705 1 0 Aug 5 ? 10:06 /usr/lib/netsvc/yp/ypserv



#root@lgapps:/var/yp > ll
total 148
-r-xr--r-- 1 bin bin 14846 May 14 2002 Makefile
-r-xr--r-- 1 root sys 14175 May 14 2002 Makefile.051402
drwxr-xr-x 2 root sys 96 Nov 12 2008 binding
drwxrwxrwx 2 root sys 3072 Aug 13 08:24 emdeng
-r--r--r-- 1 bin bin 403 Nov 6 1997 securenets
-r--r--r-- 1 bin bin 412 Nov 6 1997 secureservers
-r--r--r-- 1 bin bin 295 Nov 6 1997 updaters
-r-xr--r-- 1 bin bin 18287 Jul 17 2002 ypmake
-r-xr--r-- 1 root sys 17764 May 14 2002 ypmake.051402
-r-xr--r-- 1 bin bin 556 Nov 6 1997 ypxfr_1perday
-r-xr--r-- 1 bin bin 311 Nov 6 1997 ypxfr_1perhour
-r-xr--r-- 1 bin bin 490 Nov 6 1997 ypxfr_2perday



#root@lgapps:/var/yp/binding > ll
total 2
-rw-r--r-- 1 root root 14 Aug 13 11:54 emdeng.2



#root@lgapps:/var/yp/emdeng > ll
total 1622
-rw-rw-rw- 1 root sys 0 Apr 25 2007 aliases.time
-r--r--r-- 1 root sys 4096 Apr 21 2006 auto.direct.dir
-r--r--r-- 1 root sys 4096 Apr 21 2006 auto.direct.pag
-r--r--r-- 1 root sys 0 May 14 2002 auto.master.dir
-r--r--r-- 1 root sys 1024 May 14 2002 auto.master.pag
-rw-rw-rw- 1 root sys 0 Apr 21 2006 auto_direct.time
-rw-rw-rw- 1 root sys 0 May 14 2002 auto_master.time
-r--r--r-- 1 root sys 4096 Jul 28 11:00 group.bygi.dir
-r--r--r-- 1 root sys 8192 Jul 28 11:00 group.bygi.pag
-r--r--r-- 1 root sys 4096 Aug 10 10:26 group.bygid.dir
-r--r--r-- 1 root sys 8192 Aug 10 10:26 group.bygid.pag
-r--r--r-- 1 root sys 4096 Jul 28 11:00 group.byna.dir
-r--r--r-- 1 root sys 15360 Jul 28 11:00 group.byna.pag
-r--r--r-- 1 root sys 4096 Aug 10 10:26 group.byname.dir
-r--r--r-- 1 root sys 15360 Aug 10 10:26 group.byname.pag
-rw-rw-rw- 1 root sys 0 Aug 10 10:26 group.time
-r--r--r-- 1 root sys 4096 May 27 08:39 hosts.byaddr.dir
-r--r--r-- 1 root sys 14336 May 27 08:39 hosts.byaddr.pag
-r--r--r-- 1 root sys 4096 May 27 08:39 hosts.byname.dir
-r--r--r-- 1 root sys 60416 May 27 08:39 hosts.byname.pag
-rw-rw-rw- 1 root sys 0 May 27 08:39 hosts.time
-rw-r--r-- 1 root sys 4096 Apr 25 2007 mail.aliases.dir
-rw-r--r-- 1 root sys 26624 Apr 25 2007 mail.aliases.pag
-rw-r--r-- 1 root sys 4096 Apr 25 2007 mail.byaddr.dir
-rw-r--r-- 1 root sys 16384 Apr 25 2007 mail.byaddr.pag
-r--r--r-- 1 root sys 4096 Feb 11 2005 netgroup.byhost.dir
-r--r--r-- 1 root sys 12288 Feb 11 2005 netgroup.byhost.pag
-r--r--r-- 1 root sys 0 Feb 11 2005 netgroup.byuser.dir
-r--r--r-- 1 root sys 1024 Feb 11 2005 netgroup.byuser.pag
-r--r--r-- 1 root sys 4096 Feb 11 2005 netgroup.dir
-r--r--r-- 1 root sys 14336 Feb 11 2005 netgroup.pag
-rw-rw-rw- 1 root sys 0 Feb 11 2005 netgroup.time
-r--r--r-- 1 root sys 4096 Aug 13 08:23 netid.byname.dir
-r--r--r-- 1 root sys 56320 Aug 13 08:23 netid.byname.pag
-rw-rw-rw- 1 root sys 0 Aug 13 08:23 netid.time
-r--r--r-- 1 root sys 0 May 6 2002 networks.byaddr.dir
-r--r--r-- 1 root sys 1024 May 6 2002 networks.byaddr.pag
-r--r--r-- 1 root sys 0 May 6 2002 networks.byname.dir
-r--r--r-- 1 root sys 1024 May 6 2002 networks.byname.pag
-rw-rw-rw- 1 root sys 0 May 6 2002 networks.time
-r--r--r-- 1 root sys 4096 Jul 28 12:52 passw.byna.dir
-r--r--r-- 1 root sys 119808 Jul 28 12:52 passw.byna.pag
-r--r--r-- 1 root sys 4096 Jul 28 12:52 passw.byui.dir
-r--r--r-- 1 root sys 187392 Jul 28 12:52 passw.byui.pag
-r--r--r-- 1 root sys 4096 Aug 13 08:24 passwd.byname.dir
-r--r--r-- 1 root sys 119808 Aug 13 08:24 passwd.byname.pag
-r--r--r-- 1 root sys 4096 Aug 13 08:24 passwd.byuid.dir
-r--r--r-- 1 root sys 187392 Aug 13 08:24 passwd.byuid.pag
-rw-rw-rw- 1 root sys 0 Aug 13 08:24 passwd.time
-r--r--r-- 1 root sys 0 May 6 2002 protocols.byname.dir
-r--r--r-- 1 root sys 1024 May 6 2002 protocols.byname.pag
-r--r--r-- 1 root sys 0 May 6 2002 protocols.bynumber.dir
-r--r--r-- 1 root sys 1024 May 6 2002 protocols.bynumber.pag
-rw-rw-rw- 1 root sys 0 May 6 2002 protocols.time
-r--r--r-- 1 root sys 0 May 6 2002 publickey.byname.dir
-r--r--r-- 1 root sys 1024 May 6 2002 publickey.byname.pag
-rw-rw-rw- 1 root sys 0 May 6 2002 publickey.time
-r--r--r-- 1 root sys 4096 May 21 2003 rpc.byname.dir
-r--r--r-- 1 root sys 2048 May 21 2003 rpc.byname.pag
-r--r--r-- 1 root sys 4096 May 21 2003 rpc.bynumber.dir
-r--r--r-- 1 root sys 2048 May 21 2003 rpc.bynumber.pag
-rw-rw-rw- 1 root sys 0 May 21 2003 rpc.time
-r--r--r-- 1 root sys 4096 Aug 19 2008 servi.bynp.dir
-r--r--r-- 1 root sys 15360 Aug 19 2008 servi.bynp.pag
-r--r--r-- 1 root sys 4096 Aug 19 2008 services.byname.dir
-r--r--r-- 1 root sys 17408 Aug 19 2008 services.byname.pag
-rw-rw-rw- 1 root sys 0 Aug 19 2008 services.time
-r--r--r-- 1 root sys 0 May 6 2002 vhe_list.dir
-r--r--r-- 1 root sys 1024 May 6 2002 vhe_list.pag
-rw-rw-rw- 1 root sys 0 May 6 2002 vhe_list.time
-r--r--r-- 1 root sys 0 Oct 25 2007 ypservers.dir
-r--r--r-- 1 root sys 1024 Oct 25 2007 ypservers.pag




If you need more details then pls tell me.


I have some questions:

1)Even after getting above issues, we are able to log in from NIS client using NIS user, so is NIS working fine?


2)The above error will harm any thing / impact any thing?


3)How to find the NIS slave server?


please help me.
Jamie A Dennis
Frequent Advisor

Re: NIS update error.

Hi Senthil,

It seems it is working at least for user authentication. If NIS lookups and authentication are working, then the error may be a false read, but processes usually don't provide an error if there isn't some problem. :)

To see if you have any slave servers, run ypcat ypservers

To list out your maps, run ypwhich -x or ypcat -x. Not sure if that will shed any light on the situation, but it seems you may have one bad map which is causing the error.

I would run yppush -v and see if any additional errors are generated.

Best regards,

Jamie
"If hindsight is 20/20, why don't more people use their rearview mirrors?" - James (Jamie) A. Dennis, 1998