Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Nov 2005 17:45:41 -0500
From:      "matt ." <fasterdisco@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Fun with passwd files
Message-ID:  <a97e11c20511261445g71f4cabcmef793bca18cc098f@mail.gmail.com>
In-Reply-To: <a97e11c20511261431h78f26461i69c51028d157e021@mail.gmail.com>
References:  <a97e11c20511261431h78f26461i69c51028d157e021@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ah-ha....seems if I do anything to update the /etc/passwd file, it'll
populate with the latest /etc/master.passwd entries...for example I just
updated the default shell for a different users, and voila, I see good ol'
jschneider added to the /etc/passwd file now.

So, I was likley only seeing previous users in there because I was randomly
updating other user attributes.

The question now is this...I see a switch for pwd_mkdb which is "-p",
meaning generate a /etc/passwd file.  Going forward, when manually adding a
new user to /etc/master.passwd, am I now to issue "pwd_mkdb -p <file>" to
properly update /etc/passwd at the same time?  Seems to me this is the thin=
g
to do, however it's my first time really messing with this sort of thing...

matt

On 11/26/05, matt . <fasterdisco@gmail.com> wrote:
>
> Hey folks,
>
> I wonder if anybody can help me out here...
>
> FreeBSD 6.0-RELEASE
>
> I'm doing a user migration.  I'm manually populating the
> /etc/master.passwd with user entries from the old box.  I run pwd_mkdb on
> the master.passwd file.  This was working dandy until a few moments ago.
> I added a user, then attempted to delete the user using "pw userdel
> <username>" and I get this:
>
> host# pw userdel jschneider
> pw: user 'jschneider' does not exist: No such file or directory
>
> This was weird.  I can usermod, usershow and finger "jschneider" just
> fine.  When I change jschneider's password using passwd, magically I am n=
ow
> able to delete him using "pw userdel".
>
> I found out jschneider was being added to /etc/master.passwd but not into
> /etc/passwd.  However previous users I had manually added using the same
> method did end up in the /etc/passwd file.  So I'm confused.  Now it seem=
s
> any user I manually add to master.passwd and run pwd_mkdb on, doesn't get
> populated into /etc/passwd.  Any clue what's going on here?
>
> kind regards,
>
> matt
>
>



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