Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Jun 2014 22:35:51 -0500
From:      Paul Schmehl <pschmehl_lists@tx.rr.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Weird behavior with user creation
Message-ID:  <A3BD7FB1AD4F21BB090565D2@Pauls-MacBook-Pro.local>
In-Reply-To: <E740146035782E1E4202845A@Pauls-MacBook-Pro.local>
References:  <E740146035782E1E4202845A@Pauls-MacBook-Pro.local>

next in thread | previous in thread | raw e-mail | index | archive | help
--On June 9, 2014 at 9:17:43 PM -0500 Paul Schmehl 
<pschmehl_lists@tx.rr.com> wrote:

> I tried to create a user in the usual way (I've deliberately changed the
> real username):
>
># pw useradd testing -m -s /usr/local/bin/bash
># pw: user 'testing' disappeared during update
>
> If I grep /etc/passwd, the user is there:
>
># grep testing /etc/passwd
> testing:*:1009:1009:User &:/home/vembu:/usr/local/bin/bash
>
> Same for /etc/group:
># grep testing /etc/group
> testing:*:1009:
>
> But his home directory didn't get created.  And even weirder, when I try
> to set his password, the system says he doesn't exist:
>
># passwd testing
> passwd: testing: no such user
>
> If I run pwd_mkdb to check the file, it seems that it's corrupted somehow:
>
> pwd_mkdb -C /etc/pwd.db
> pwd_mkdb: line #1 too long
> pwd_mkdb: /etc/pwd.db: Inappropriate file type or format
>
> It's the same for spwd.db:
>
># pwd_mkdb -C /etc/spwd.db
> pwd_mkdb: line #1 too long
> pwd_mkdb: /etc/spwd.db: Inappropriate file type or format
>
> spwd and pwd are different.
>
># diff /etc/spwd.db /etc/pwd.db
> Files /etc/spwd.db and /etc/pwd.db differ
>
> What happened?  More importantly, how do I fix it?  My password and the
> root password both work fine, so I don't want to screw those up.
>
> System is 8.4 RELEASE, just upgraded.
>

In case anyone is reading this in the future, the problem was resolved by 
running pwd_mkdb /etc/master.passwd

> Paul Schmehl, Senior Infosec Analyst
> As if it wasn't already obvious, my opinions
> are my own and not those of my employer.
> *******************************************
> "It is as useless to argue with those who have
> renounced the use of reason as to administer
> medication to the dead." Thomas Jefferson
> "There are some ideas so wrong that only a very
> intelligent person could believe in them." George Orwell
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe@freebsd.org"
>



Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
*******************************************
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell




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