Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nis make error

Status
Not open for further replies.

mgrun

IS-IT--Management
Jul 15, 2002
44
IL
I got the following message while compiling the NIS maps. Does anybody know what this means
make[1]: Entering directory `/var/yp/tables'
/bin/sh: awk: execute permission denied
NIS make terminated: group.time
make[1]: *** [group.time] Error 208
Terminated
make: *** [k] Error 143
Terminated

Thanks
Mgrun Micha Grunberg
Unix Sys-Admin
 
Guess u r running NIS scripts with non root user priviledges. - Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
 
Thanks

I tryed it and I made sure that I was root but that did not solve the problem Micha Grunberg
Unix Sys-Admin
 
Files in /var/yp and Other nis Files

On a NIS client, the following files exist:

/etc/nsswitch.conf for solaris[TM]
/etc/defaultdomain
/var/yp>ls -l
total 6
-rw-r--r-- 1 root root 214 Feb 7 1996 aliases
drwxr-xr-x 3 bin bin 512 Sep 4 10:43 binding
-rw-r--r-- 1 bin bin 180 Feb 3 1995 nicknames

/yar/yp/nicknames stores the nicknames for maps. When you do a ypcat passwd, the nicknames file tells it to do a ypcat passwd.byname.

/var/yp/aliases contains full-length and truncated domain and map names accessed by YP commands. There should not be any reason to edit this file.
The /var/yp/binding directory contains a bunch of ascii files starting with xprt. ypbind.pid, which contains the pid of the current or last run ypbind process.

/var/yp/binding/`domainname` contains a data file called cache_binding and on Solaris[TM] 2.x Operating Environment it can contain an ascii file called ypservers. ypservers is what is created when you specify servers to bind to with ypinit -c. The ypservers file contains a list of NIS servers, one per line, that the ypbind process will contact, in turn, until it successfully manages to get a binding.
- On an NIS server itself, this file should normally contain just the name of that machine.
- On an NIS client it should contain a list of all the
NIS servers.

If the ypservers file does not exist, the ypbind process will be started with the "-broadcast" option, which means it will send a broadcast packet to the local subnet to try and locate a NIS server. This file can be modified when you want to bind to a different specific server at
boot.

On a NIS server, the following files exist in addition to the above:

# ls -l
total 150
-r-xr-xr-x 1 bin bin 13313 Jul 5 13:14 Makefile
-rw-r--r-- 1 root other 376 Aug 14 14:40 aliases
-rw-r--r-- 1 root other 0 Jul 12 13:25 aliases.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 auto.home.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 auto.master.time
drwxr-xr-x 4 root other 512 Aug 17 12:35 binding
drwxr-xr-x 2 root other 1536 Jul 12 13:17 mydomain.com
-rw-r--r-- 1 root other 0 Jul 12 13:25 group.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 hosts.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 netgroup.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 netid.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 netmasks.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 networks.time
-rw-r--r-- 1 bin bin 208 Apr 25 11:02 nicknames
-rw-r--r-- 1 root other 0 Jul 12 13:25 passwd.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 protocols.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 publickey.time
drwxr-xr-x 2 root other 512 Jun 6 12:09 pwdir
-rw-r--r-- 1 root other 0 Jul 12 13:25 rpc.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 services.time
-rw-r--r-- 1 root other 0 Jul 12 13:25 timezone.time

Makefile the script needed to create and modify maps. Always make a backup copy before modifying it. On SunOS[TM] 4.x machines the template file exists /usr/lib/NIS.Makefile.

All the *.time files are 0 length and serve only as a timestamp. If you need to remake a map simply remove the appropriate *.time file and run make.

The `domainname` directory contains the actual maps.
# ls
auto.home.dir netmasks.byaddr.pag
auto.home.pag networks.byaddr.dir
auto.master.dir networks.byaddr.pag
auto.master.pag networks.byname.dir
group.bygid.dir networks.byname.pag
group.bygid.pag passwd.byname.dir
group.byname.dir passwd.byname.pag
group.byname.pag passwd.byuid.dir
hosts.byaddr.dir passwd.byuid.pag
hosts.byaddr.pag protocols.byname.dir
hosts.byname.dir protocols.byname.pag
hosts.byname.pag protocols.bynumber.dir
mail.aliases.dir protocols.bynumber.pag
mail.aliases.pag publickey.byname.dir
mail.byaddr.dir publickey.byname.pag
mail.byaddr.pag rpc.bynumber.dir
netgroup.byhost.dir rpc.bynumber.pag
netgroup.byhost.pag services.byname.dir
netgroup.byuser.dir services.byname.pag
netgroup.byuser.pag services.byservicename.dir
netgroup.dir services.byservicename.pag
netgroup.pag timezone.byname.dir
netid.byname.dir timezone.byname.pag
netid.byname.pag ypservers.dir
netmasks.byaddr.dir ypservers.pag
Most of these maps have a many to one relationship to a file in /etc. The
passwd maps passwd.byname and passwd.byuid are the exception they contain 2
files /etc/passwd and /etc/shadow. The ypservers map do not have a file
equivalent.

Often we refer to the maps simply as files put in a database, but that is not entirely true. NIS maps are constructed from DBM database files. DBM is
the database system build into SunOS 4.x and is supplied with NSKIT on Solaris 2.x. A database is a set of keys and values with the ability to do fast lookups. The flat /etc/files require a linear lookup while the database
files can be searched faster by a specific key. The NIS maps are comprised of two files: *.dir which is a hash-table accessed bitmap of indexes and *.pag a data file. Data files contain records in hashed order and can have
holes in them. They are stored in a sparse format, consequently copying them with ordinary UNIX commands can result in expanding the holes into zero-filled disk blocks consuming more disk space. Therefore, use the unix cp command only as a last resort.

If /var/yp/securenets exists on SunOS 4.1.3_u1 or 4.1.4, who can retrieve your NIS maps is restricted. The contents of this file should be a number of lines which each read: netmask address

For example, if you want only the machines 150.101.16.28 and
129.45.16.29 to be able to retrieve your NIS maps, enter the
two lines:

255.255.0.0 150.101.16.28
255.255.0.0 150.101.16.29

If /var/yp/ypserv.log exists when ypserv is started, errors and warnings will be written to this file.

The NIS commands
Solaris:

/usr/sbin/ypalias
/usr/sbin/ypinit
/usr/sbin/yppoll
/usr/sbin/ypset

/usr/lib/netsvc/yp/mkalias
/usr/lib/netsvc/yp/multi
/usr/lib/netsvc/yp/multi.awk
/usr/lib/netsvc/yp/rpc.yppasswdd
/usr/lib/netsvc/yp/stdethers
/usr/lib/netsvc/yp/stdhosts
/usr/lib/netsvc/yp/udpublickey
/usr/lib/netsvc/yp/ypbind
/usr/lib/netsvc/yp/yppush
/usr/lib/netsvc/yp/ypserv
/usr/lib/netsvc/yp/ypxfr
/usr/lib/netsvc/yp/ypxfr_1perday
/usr/lib/netsvc/yp/ypxfr_1perhour
/usr/lib/netsvc/yp/ypxfr_2perday
/usr/lib/netsvc/yp/ypxfrd


SunOS:
/usr/etc/ypbind
/usr/etc/ypserv
/usr/etc/ypxfrd


/usr/etc/yp/makedbm
/usr/etc/yp/mkalias
/usr/etc/yp/mknetid
/usr/etc/yp/revnetgroup
/usr/etc/yp/stdethers
/usr/etc/yp/stdhosts
/usr/etc/yp/udpublickey
/usr/etc/yp/ypinit
/usr/etc/yp/yppoll
/usr/etc/yp/yppush
/usr/etc/yp/ypset
/usr/etc/yp/ypxfr
/usr/etc/yp/ypxfr_1perday
/usr/etc/yp/ypxfr_1perhour
/usr/etc/yp/ypxfr_2perday

regards ph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top