Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 659
  • Last Modified:

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.
  • 4
  • 2
  • 2
  • +1
3 Solutions
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 ?
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now