Passwd file oddity.

Bill Vermillion bv at wjv.com
Fri Mar 4 17:52:16 GMT 2005


When asked his whereabouts on Fri, Mar 04, 2005 at 09:29 , 
Keith Woodworth took the fifth, drank it, and then slurred:


> I just setup a new box w/ FBSD 4.10 as we are slowly migrating from
> BSD/OS.

> Ive moved a few machines to FBSD and am now to the point I just
> copy the passwd and master.passwd files over from one machine to
> another for users.

> Our main mail server has been running 4.10 for 5 months now and
> copied the passwd files over from the mail server to the new
> machine. Same OS version, same ssh version ( I upgraded from the
> stock sshd that comes with 4.10) as well as a few other pieces
> of software.

> The wierd thing is that the new machine still seems to be trying
> to use the old passwd files. I try ssh'ing into the new machine
> using my current passwd and it fails. But I can login via my old
> passwd that I used to setup this machine.

> I went to setup a directory for a user, went to chown it to the
> user but get an error unknown user, even though the user is in
> passwd and master.passwd.

> It seems like the machine is using another passwd file. I have
> passwd/master.passwd in /etc. Is there somewhere else this info
> is hidden? The passwd file is a combo of standard crypt() and
> md5 hashes, which does not seem to bother the mailserver for
> various things, but seems to be having a problem on this new
> machine, though that should not be an issue as far as I can
> tell.

> Ive not run into this before and have copied the passwd files
> over from machine to machine before a few times with no problem.

> Anyone have an idea here?

Absolutely.

master.passwd contains all the information about the users BUT
when you add users normally the pwd_mkdb program is run afterword
to generate pwd.db.

So since you copied the files over you must run pwd_mkdb to
generate a new pwd.db.  That is the file the system uses - and why
it gained so much performance over the old SysV things that
actually read the password file each and everytime - while a
database read is much faster.

Bill
-- 
Bill Vermillion - bv @ wjv . com


More information about the freebsd-isp mailing list