NIS doesn't appear to want to compile

2 quesitons:

1. is the "make: Warning: Don't know how to make target `/var/yp/source/publickey'" important?

2. The following I pressume is definatly more important as it causes the make to fail

"*** Error code 1
make: Fatal error: Command failed for target `k'
Error running Makefile."

The box is solaris 9 with the latest cluster patch, how do I resolve this?

when running ypinit -m I see the following:

Do you want this procedure to quit on non-fatal errors? [y/n: n]  y
The yp domain directory is /var/yp/nisnet
There will be no further questions. The remainder of the procedure should take
5 to 10 minutes.
Building /var/yp/nisnet/ypservers...
Running /var/yp /Makefile...
updated passwd
updated group
updated hosts
updated ethers
updated networks
updated rpc
updated services
updated protocols
updated netgroup
/var/yp/nisnet/mail.aliases: 12 aliases, longest 10 bytes, 138 bytes total
/usr/lib/netsvc/yp/mkalias /var/yp/nisnet/mail.aliases /var/yp/nisnet/mail.byaddr;
updated aliases
make: Warning: Don't know how to make target `/var/yp/source/publickey'
Current working directory /var/yp
updated netid
/usr/sbin/makedbm /var/yp/source/netmasks /var/yp/nisnet/netmasks.byaddr;
updated netmasks
updated timezone
updated auto.master
updated auto.home
updated ageing
updated auth_attr
updated exec_attr
updated prof_attr
updated user_attr
updated audit_user
make: Warning: Target `all' not remade because of errors
Current working directory /var/yp
*** Error code 1
make: Fatal error: Command failed for target `k'
Error running Makefile.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I haven't done NIS in a LONG time but has anyone modified the NIS makefile recently ?  I don't specifically remember a "k" section of that makefile.

This smells like a typo in that Makefile.
matjcAuthor Commented:
This is Sun's MakeFile (lease thats what the copyright says at the top of it, I took this from a recently installed solaris 9 machine so might expect so

"k" looks like this:

       @if [ ! $(NOPUSH) ]; then $(MAKE)  $(MFLAGS) -k all; \
       else $(MAKE) $(MFLAGS) -k all NOPUSH=$(NOPUSH);fi

commenting it out makes it compile fine so I may just leave it that way , but if you can tell me what it is supposed to do?

Its no supprise this doesn compile when MAKE and  MFLAGS are not defined as variables in the file anywhere.
Well then ... just luv how descriptive that section of the makefile is :)

Like I said ... its been a while ... but that section seems to be related to a NIS master pushing NIS information down to its slave NIS servers during a NIS map make cycle.   Actually, if I remember correctly, its not really a push ... more of a pull considering how NIS works at the replication level.

Have you got NIS servers in the same NIS domain besides the one you are running the make on ?
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Did you remember to setup your domain before start setting up your NIS master?

Have a look at the procedures in the following NIS FAQ and try again:

setup example:


PS: I have not use NIS for nearly 5 years now. I prefer NIS+. Solaris 9 or newer will
      stop suport NIS+ (current still support it)
I think the fowllowing Sun NIS setup doc is better than the FAQ:
If you are running Solaris 9 X 86, you need to apply 114241-10 patch. (domainname)
for Solaris 9 (Sparc) apply 112960-20 .

>       @if [ ! $(NOPUSH) ]; then $(MAKE)  $(MFLAGS) -k all; \
>       else $(MAKE) $(MFLAGS) -k all NOPUSH=$(NOPUSH);fi

-k is an option for "make" which means when a nonzero error status is returned by a rule,  or
when  make  cannot  find  a rule, abandons work on the current target, but continues  with  other
dependency branches that do not depend on it.

Since k: is the first one in the /var/yp/Makefile (even before all:). So "make" process it first.

By the way, for NIS, make sure that you use /usr/ccs/bin/make. Do "which make" to chekc which binary make you are use.
Besides, you can define $MAKE in /var/yp/Makefile as follow:
and uncomment k: to see it works


matjcAuthor Commented:
Whilst it looks like patch 114231-10 helped with stability and commenting out k means I can compile the Makefile I am still seeing the following:

Oct 26 08:54:32 netservices rpc.nisd_resolv[4656]: [ID 601014 daemon.error] nre
s_gethostbyaddr: netservice1.testdomain !=

a few of the above and :

Oct 26 08:54:32 netservices rpc.nisd_resolv[4656]: [ID 122627 daemon.error] rec
v failed: Bad file number.
Oct 26 08:54:32 netservices  rpc.nisd_resolv[4656]: [ID 649263 daemon.error] sen
dto failed: Bad file number.

Any clues?
>Oct 26 08:54:32 netservices rpc.nisd_resolv[4656]: [ID 601014 daemon.error] nre
>s_gethostbyaddr: netservice1.testdomain !=
You can reference the following URL and apply the patch 100141-01 if needed.

Just came back from AusCERT, and found an new email from SunSolve, you need to
apply patch 115166-05 as well.
   please read:
you also need to apply: 115678-01 (idsconfig patch)
                                   114342-07  YP components patch

The patch was release yesterday!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.