*BSD News Article 67673


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!cancer.vividnet.com!hunter.premier.net!news.mathworks.com!newsfeed.internetmci.com!uwm.edu!lll-winken.llnl.gov!sol.ctr.columbia.edu!sirius.ctr.columbia.edu!wpaul
From: wpaul@ctr.columbia.edu (Bill Paul)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: NIS client setup
Date: 4 May 1996 17:19:45 GMT
Organization: Columbia University Center for Telecommunications Research
Lines: 57
Message-ID: <4mg3ji$d6l@sol.ctr.columbia.edu>
References: <3189E69E.727C@arrakis.comm.pub.ro>
NNTP-Posting-Host: sirius.ctr.columbia.edu
X-Newsreader: TIN [version 1.2 PL2]

Daring to challenge the will of the almighty Leviam00se, Alex Maranda
(alex@arrakis.comm.pub.ro) had the courage to say:

: Hi everybody,
: 	I have encountered problems in setting up NIS as client
:  on a few FreeBSD2.1 boxes. I can see the NIS maps with
: ypcat,ypmatch,..
: but I fail to add the correct entry to /etc/master.passwd.
: I tried +::0:0::0:0::: instead of +::0:0::: ( which of course does
          ^^^^^^^^^^^^^^

No! Take out all the zeroes. All of them!!

: not 
: work any more with the new passwd format) . After running 
: pwd_mkdb -p /etc/master.passwd, I *can* log in on users from the NIS
: server,
: ..but the actual uid:gid given to the session is 0:0 (..ouch). The
: login
: directory is the right one. I suspect that the actual "+"
: incantation,
: (which by the way is reffered as a special "+" entry in the man page)
: is more subtle than my silly guess.

Read the passwd(5) man page. (man 5 passwd)

No, I take that back: don't just read it. When most people say 'yeah,
I read the man page' it really means 'I typed "man foo" and I saw
it print something ont he screen, but I didn't bother to look at it
closely.'

Read and _understand_ the passwd(5) man page. Especially the part
where it cites an example '+' entry just like the one you used and
then says in big letters DON'T DO THAT!!

Of _COURSE_ the UID ang GID values are getting changed to zero: you
put zeroes in those fields, so the values are being remapped, just
like it says in the man page!

All you have to do is add one line to the end of /etc/master.passwd
that says:

+:::::::::

That's a + sign and nine colons (again, just like it says in the man
page). No extra characters. No extraneous zeroes. No nuthin'.

-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."
=============================================================================