Solved

NIS doesn't appear to want to compile

Posted on 2004-10-24
635 Views
Last Modified: 2013-12-27
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.
0
Question by:matjc
    10 Comments
     
    LVL 10

    Expert Comment

    by:Nukfror
    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.
    0
     

    Author Comment

    by:matjc
    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:

    k:
           @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.
    0
     
    LVL 10

    Expert Comment

    by:Nukfror
    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 ?
    0
     
    LVL 38

    Expert Comment

    by:yuzh
    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:
    http://www.sunhelp.org/faq/nis.html#nis8

    setup example:
    http://agamemnon.ucs.ed.ac.uk/faq/Unix/NIS/NIS_MasterServer.html

    Full NIS FAQ:
    http://www.sunhelp.org/faq/nis.html

    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)
          see: http://wwws.sun.com/software/solaris/faqs/nisplus.html
    0
     
    LVL 38

    Expert Comment

    by:yuzh
    I think the fowllowing Sun NIS setup doc is better than the FAQ:

    http://docs.sun.com/db/doc/806-1386/6jam5ahmj?a=view
    0
     
    LVL 38

    Assisted Solution

    by:yuzh
    If you are running Solaris 9 X 86, you need to apply 114241-10 patch. (domainname)
    for Solaris 9 (Sparc) apply 112960-20 .
    0
     
    LVL 38

    Assisted Solution

    by:wesly_chen
    Hi,

    >k:
    >       @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:
    MAKE=/usr/ccs/bin/make
    and uncomment k: to see it works

    Regards,

    Wesly
    0
     

    Author Comment

    by:matjc
    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 != 0.0.0.0.

    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?
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    >Oct 26 08:54:32 netservices rpc.nisd_resolv[4656]: [ID 601014 daemon.error] nre
    >s_gethostbyaddr: netservice1.testdomain != 0.0.0.0.
    You can reference the following URL and apply the patch 100141-01 if needed.
    http://www.bjnet.edu.cn/sun-admin/FAQ/F-comp-sys-sun/Q53-0.html


    Wesly
    0
     
    LVL 38

    Accepted Solution

    by:
    Just came back from AusCERT, and found an new email from SunSolve, you need to
    apply patch 115166-05 as well.
       please read: http://sunsolve6.sun.com/search/document.do?assetkey=1-21-115166-05-1
    you also need to apply: 115678-01 (idsconfig patch)
                                       114342-07  YP components patch

    The patch was release yesterday!
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Lean Six Sigma Project Manager Certification

    There are many schools of thought around successful project management, but few as highly regarded as the Six Sigma and Lean methods. With 37 hours of learning, this training will explain concrete processes for increasing efficiency and limiting wasted time and effort.

    When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now