Hello
I'm trying to setting up an NIS Master server but it always failes
with following error message:
Many thanks for any help
iwok
---------------------------------------------------------
bash-2.03# ypinit -m
In order for NIS to operate sucessfully, we have to construct a list of
the
NIS servers. Please continue to add the names for YP servers in order
of
preference, one per line. When you are done with the list, type a
<control D>
or a return on a line by itself.
next host to add: homer
next host to add:
The current list of yp servers looks like this:
homer
Is this correct? [y/n: y] y
Installing the YP database will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure.
Do you want this procedure to quit on non-fatal errors? [y/n: n] y
The yp domain directory is /var/yp/iwok.li
Can we destroy the existing /var/yp/iwok.li and its contents? [y/n: n]
y
There will be no further questions. The remainder of the procedure
should take
5 to 10 minutes.
Building /var/yp/iwok.li/ypservers...
Running /var/yp /Makefile...
updated passwd
updated group
updated hosts
updated ethers
updated networks
updated rpc
updated services
updated protocols
updated netgroup
updated bootparams
/var/yp/iwok.li/mail.aliases: 4 aliases, longest 14 bytes, 74 bytes
total
/usr/lib/netsvc/yp/mkalias /var/yp/`domainname`/mail.aliases
/var/yp/`domainname`/mail.byaddr;
updated aliases
make: Warning: Don't know how to make target `/var/yp/src/publickey'
Current working directory /var/yp
updated netid
make: Warning: Don't know how to make target `/var/yp/src/netmasks'
Current working directory /var/yp
updated timezone
updated auto.master
updated auto.home
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.
---------------------------------------------------------------------
Makefile looks like:
---------------------------------------------------------------------
#
# Copyright (c) 1996-1999, by Sun Microsystems, Inc.
# All rights reserved.
#
#pragma ident "@(#)Makefile 1.26 00/02/14 SMI"
#
#----
# It is somewhat confusing to note that Solaris 2.x uses
/etc/auto_master
# instead of the 4.x /etc/auto.master file name because of NIS+ treating
a
# "." in a special way.
#
# Set the following variable to "-b" to have NIS servers use the domain
name
# resolver for hosts not in the current domain.
#B=-b
B = -b
DIR = /var/yp/src
#
# If the ipnodes (IPv6 hosts file) lives in a directory other than
# /etc/inet, then you'll need to change the following line.
#
INETDIR=/etc/inet
#
# If the passwd, shadow and/or adjunct files used by rpc.yppasswdd
# live in directory other than /etc then you'll need to change the
# following line.
# DO NOT indent the line, however, since /etc/init.d/yp attempts
# to find it with grep "^PWDIR" ...
#
PWDIR = /var/yp/src
DOM = `domainname`
NOPUSH = ""
ALIASES = /var/yp/src/aliases
YPDIR=/usr/lib/netsvc/yp
SBINDIR=/usr/sbin
YPDBDIR=/var/yp
YPPUSH=$(YPDIR)/yppush
MAKEDBM=$(SBINDIR)/makedbm
MULTI=$(YPDIR)/multi
REVNETGROUP=$(SBINDIR)/revnetgroup
STDETHERS=$(YPDIR)/stdethers
STDHOSTS=$(YPDIR)/stdhosts
MKNETID=$(SBINDIR)/mknetid
MKALIAS=$(YPDIR)/mkalias
CHKPIPE= || ( echo "NIS make terminated:" $@ 1>&2; kill -TERM 0 )
k:
@if [ ! $(NOPUSH) ]; then $(MAKE) $(MFLAGS) -k all; \
else $(MAKE) $(MFLAGS) -k all NOPUSH=$(NOPUSH);fi
all: passwd group hosts ethers networks rpc services protocols netgroup
bootparams aliases publickey netid n
etmasks c2secure timezone auto.master auto.home
c2secure:
-@if [ -f $(PWDIR)/security/passwd.adjunct ]; then \
if [ ! $(NOPUSH) ]; then $(MAKE) $(MFLAGS) -k \
passwd.adjunct.time group.adjunct.time; \
else $(MAKE) $(MFLAGS) -k NOPUSH=$(NOPUSH) \
passwd.adjunct.time group.adjunct.time; \
fi; \
fi
passwd.time: $(PWDIR)/passwd $(PWDIR)/shadow
-@if [ -f $(PWDIR)/security/passwd.adjunct ]; then \
(nawk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ { $$2 =
"##" $$1; printf "%s\t%s\n", $$1, $
$0 }' $(PWDIR)/passwd $(CHKPIPE)) | $(MAKEDBM) -
$(YPDBDIR)/$(DOM)/passwd.byname; \
(nawk 'BEGIN { FS=":"; OFS=":" } /^[a-zA-Z0-9_]/ { $$2
= "##" $$1; printf "%-10d\t%s\n", $$
3, $$0 }' $(PWDIR)/passwd $(CHKPIPE)) | $(MAKEDBM) -
$(YPDBDIR)/$(DOM)/passwd.byuid; \
elif [ -f $(PWDIR)/shadow ]; then \
(nawk 'BEGIN { FS=":"; OFS=":"; while ( getline <
"$(PWDIR)/shadow" > 0) shadow[$$1] = $$2;
- $(YPDBDIR)/$(DOM)/passwd.byname; \
(nawk 'BEGIN { FS=":"; OFS=":"; while ( getline <
"$(PWDIR)/shadow" > 0) shadow[$$1] = $$2;
M) - $(YPDBDIR)/$(DOM)/passwd.byuid; \
else \
(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ {
print $$1, $$0 }' $(PWDIR)/passwd $(CHK
PIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byname; \
(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ {
printf("%-10d ", $$3); print $$0 }' $(PW
DIR)/passwd $(CHKPIPE))| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/passwd.byuid; \
fi
@touch passwd.time;
@echo "updated passwd";
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.byname; fi
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) passwd.byuid; fi
@if [ ! $(NOPUSH) ]; then echo "pushed passwd"; fi
group.time: $(DIR)/group
@(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1,
$$0 }' $(DIR)/group $(CHKPIPE))| $(M
AKEDBM) - $(YPDBDIR)/$(DOM)/group.byname;
@(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ {
printf("%-10d ", $$3); print $$0 }' $(DIR)/grou
p $(CHKPIPE)) | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/group.bygid;
@touch group.time;
@echo "updated group";
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) group.byname; fi
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) group.bygid; fi
@if [ ! $(NOPUSH) ]; then echo "pushed group"; fi
project.time: $(DIR)/project
@(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ { print $$1,
$$0 }' $(DIR)/project $(CHKPIPE))| $
(MAKEDBM) - $(YPDBDIR)/$(DOM)/project.byname;
@(awk 'BEGIN { FS=":"; OFS="\t"; } /^[a-zA-Z0-9_]/ {
printf("%-10d ", $$2); print $$0 }' $(DIR)/proj
ect $(CHKPIPE)) | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/project.byprojid;
@touch project.time;
@echo "updated project";
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) project.byname; fi
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) project.byprojid;
fi
@if [ ! $(NOPUSH) ]; then echo "pushed project"; fi
ipnodes.time: $(INETDIR)/ipnodes
@($(MULTI) -n $(B) -l $(INETDIR)/ipnodes);
@($(STDHOSTS) -n $(INETDIR)/ipnodes $(CHKPIPE))| \
(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$1, $$0 }'
$(CHKPIPE)) | \
$(MAKEDBM) $(B) - $(YPDBDIR)/$(DOM)/ipnodes.byaddr;
@touch ipnodes.time;
@echo "updated ipnodes";
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) ipnodes.byname; fi
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) ipnodes.byaddr; fi
@if [ ! $(NOPUSH) ]; then echo "pushed ipnodes"; fi
hosts.time: $(DIR)/hosts
@($(MULTI) $(B) -l $(DIR)/hosts);
@($(STDHOSTS) $(DIR)/hosts $(CHKPIPE))| \
(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$1, $$0 }'
$(CHKPIPE)) | \
$(MAKEDBM) $(B) - $(YPDBDIR)/$(DOM)/hosts.byaddr;
@touch hosts.time;
@echo "updated hosts";
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) hosts.byname; fi
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) hosts.byaddr; fi
@if [ ! $(NOPUSH) ]; then echo "pushed hosts"; fi
ethers.time: $(DIR)/ethers
@($(STDETHERS) $(DIR)/ethers $(CHKPIPE)) \
|(awk '{print $$1, $$0; for (i = 3;i <= NF;i++) print $$i,$$0}'
$(CHKPIPE)) \
| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/ethers.byaddr
@(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$2, $$0 }' \
$(DIR)/ethers $(CHKPIPE)) | \
$(MAKEDBM) - $(YPDBDIR)/$(DOM)/ethers.byname;
@touch ethers.time;
@echo "updated ethers";
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) ethers.byname; fi
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) ethers.byaddr; fi
@if [ ! $(NOPUSH) ]; then echo "pushed ethers"; fi
networks.time: $(DIR)/networks
@(sed -e "/^#/d" -e s/#.*$$// $(DIR)/networks $(CHKPIPE)) |( awk
\
'{print $$1, $$0; for (i = 3;i <= NF;i++) print $$i,$$0}' \
$(CHKPIPE) )| $(MAKEDBM) -
$(YPDBDIR)/$(DOM)/networks.byname;
@(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$2, $$0 }' \
$(DIR)/networks $(CHKPIPE)) | $(MAKEDBM) -
$(YPDBDIR)/$(DOM)/networks.byaddr;
@touch networks.time;
@echo "updated networks";
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) networks.byname;
fi
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) networks.byaddr;
fi
@if [ ! $(NOPUSH) ]; then echo "pushed networks"; fi
services.time: $(DIR)/services
@(awk 'BEGIN { OFS="\t"; } $$1 !~ /^#/ { print $$2, $$0 }' \
$(DIR)/services $(CHKPIPE))| $(MAKEDBM) -
$(YPDBDIR)/$(DOM)/services.byname;
@(awk 'BEGIN { OFS="\t"; } \
$$1 !~ /^#/ { split($$2,pp,"/"); printf("%s/%s %s\n", $$1,
pp[2], $$0);\
if (seen[$$1] == "") {\
printf("%s %s\n", $$1, $$0); seen[$$1]=$$1;} \
for (i = 3; i <= NF && $$i !~ /^#/; i++) \
printf("%s/%s %s\n", $$i, pp[2], $$0)}' \
$(DIR)/services $(CHKPIPE)) | \
$(MAKEDBM) $(B) - $(YPDBDIR)/$(DOM)/services.byservicename
@touch
...
read more »