Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 1996 11:59:48 -0400 (EDT)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        m-braithwaite@sjca.edu
Cc:        bugs@freebsd.org
Subject:   Re: passwd says ``yppasswdd not running on NIS master host''
Message-ID:  <199608261559.LAA12361@skynet.ctr.columbia.edu>
In-Reply-To: <199608261421.KAA00853@continuity.sjca.edu> from "Matt Braithwaite" at Aug 26, 96 10:21:41 am

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Matt 
Braithwaite had to walk into mine and say:
 
> the subject line says it all, i guess, if you add the qualifier that
> i'm doing everything else right, as near as i can tell. :-)

Everything, except you forgot to tell us what version of FreeBSD
you're using. :)

Since you said 'yppasswdd' rather than 'rpc.yppasswdd' I'm going
to assume you're using 2.1.5. (I rewrote pretty much all of the NIS
server-side support for 2.2.)
 
> i get this message on both NIS clients and on the NIS server.

Hm. Are you sure your hosts database is configured correctly? Does
the hostname for the server resolve correctly to the right IP address?

> yppasswdd is indeed running, and i can see it with rpcinfo -p, so i
> don't think it's a portmapper problem.  i am using tcp wrappers, so i
> thought this might be a problem with them, so i tried temporarily
> removing my /etc/hosts.deny, but no joy.  ypwhich gives me back the
> name of the master server with no problems.

Hm... even with tcp wrappers it should have worked on the server.
 
> i do have the kerberized versions of things installed, but so far
> kerberos is not running.  (the above message is almost certainly
> unrelated, but i just wanted to throw in all the data points.)
> 
> any thoughts on this?  thanks in advance...

Well, a couple of things:

- Try chpass too. See if it complains the same way.

- Both passwd and chpass determine the name of the master host by performing
  a yp_master() on the passwd.byname map. (By contrast, ypwhich just 
  asks ypbind what server it's bound to.) This means that the name of the
  master server must be encoded correctly into the map, otherwise they'll
  get confused. Go to the NIS server and do the following:

  # cd /var/yp/<your_domain_name>
  # yp_mkdb -u passwd.byname | grep YP_MASTER_NAME

  You should see output that looks like this:

  # cd /var/yp/test1234
  # yp_mkdb -u passwd.byname | grep YP_MASTER_NAME
  YP_MASTER_NAME OmniVAX

  YP_MASTER_NAME is a special key that the yp_mkdb program encodes into
  each NIS map as it is being built. (There are a few others too.)

  Alternatively, just do this:

  % yppoll passwd.byname

  You should see output that looks like this:

  [/home2/wpaul/libexec/ypxfr]:OmniVAX{40}% yppoll passwd.byname
  Map passwd.byname has order number 839196180. Sun Aug  4 18:03:00 1996
  The master server is OmniVAX.

  Check that the master server name is correct for your configuration
  and that it resolves correctly.

The master name encoded into all the NIS maps is determined by
/var/yp/Makefile using the hostname(1) command. If hostname(1) on
the master server returns an incorrect hostname, or a hostname which
does not resolve correctly, then you'll need to edit /var/yp/Makefile
a bit and rebuild your maps. Check in /var/yp/Makefile for a line
that says:

DBLOAD = /usr/sbin/yp_mkdb -m `hostname`

Change this so that it reflects the correct hostname for your NIS server:

DBLOAD = /usr/sbin/yp_mkdb -m my.nis.server.name

Hope this helps.

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "If you're ever in trouble, go to the CTR. Ask for Bill. He will help you."
=============================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608261559.LAA12361>