# Can't initialise NIS database

## tparker

I'm trying to setup NIS on one of my gentoo servers but appear to be having a few problems. The howto's don't seem to mention it, and I notice there isn't a gentoo specific NIS howto either (in case anything is different).

I've configured my ypserv.conf (didn't need to change much) and proceeded to run 'ypinit -m' but got the following output. ypserv is correctly started on my machine, as shown by portmap. I tried a manual 'make' of the /var/yp directory (that's how I remember it used to be done) - but get the same errors.

Any suggestions anyone?

Thanks!

--------

We need a few minutes to build the databases...

Building /var/yp/deltapath.com/ypservers...

Running /var/yp/Makefile...

gmake[1]: Entering directory `/var/yp/deltapath.com'

Updating passwd.byname...

Updating passwd.byuid...

Updating group.byname...

Updating group.bygid...

Updating hosts.byname...

Updating hosts.byaddr...

Updating rpc.byname...

Updating rpc.bynumber...

Updating services.byname...

Updating services.byservicename...

Updating netid.byname...

Updating protocols.bynumber...

Updating protocols.byname...

Updating netgroup...

Updating netgroup.byhost...

Updating netgroup.byuser...

Updating mail.aliases...

Updating shadow.byname... Ignored -> merged with passwd

gmake[1]: *** No rule to make target `/etc/publickey', needed by `publickey.byname'.  Stop.

gmake[1]: Leaving directory `/var/yp/deltapath.com'

make: *** [target] Error 2

Error running Makefile.

Please try it by hand.

----------

## Spooky Ghost

I think you need to edit the Makefile and change the all target to exclude some the building of some databases, mine looks like:

```
all:  passwd group hosts rpc services netid protocols netgrp mail \

        shadow amd.home amd.misc auto.master auto.home auto.misc # networks \

        # ethers bootparams printcap auto.local passwd.adjunct \

        # timezone locale netmasks publickey

```

I'm not sure that this is the recommended way to do this but it works...

----------

## tparker

That seems to have worked - thanks for the tip!

----------

