Fun with passwd files

2005-11-26 Thread matt .
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.passwdfile.  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 now 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 seems
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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fun with passwd files

2005-11-26 Thread matt .
Ah-haseems 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 thing
to do, however it's my first time really messing with this sort of thing...

matt

On 11/26/05, matt . [EMAIL PROTECTED] 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 now
 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 seems
 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


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fun with passwd files

2005-11-26 Thread Chuck Swiger

matt . wrote:
[ ... ]

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 thing
to do, however it's my first time really messing with this sort of thing...


Set $EDITOR properly, and run vipw.

That program will let you edit the password file and then update the other 
system-specific password databases correctly.


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]