User can't login but /etc/(master.)passwd OK

Robert Bonomi bonomi at
Wed May 9 15:02:50 UTC 2012

> From owner-freebsd-questions at  Wed May  9 07:09:19 2012
> Date: Wed, 9 May 2012 14:04:35 +0200
> From: n dhert <ndhertbsd at>
> To: freebsd-questions at
> Subject: User can't login but /etc/(master.)passwd OK
> I have a problem with a login on FreeBSD (8.3-p1)
> Dont' know what was done wrong, but a certain user (lets call it
> THATUSER) can no longer login.
> the entries for 'THATUSER in /etc/passwd and /etc/master.passwd are still
> the same as from a backup
> of 14 days ago (no change in encrypted passwd)
> The /etc/pwd.db and /etc/spwd.db  are binary files so I can't check..
> The home-directory of THATUSER is still present and contents looks normal ..

"Details are *IMPORTANT*" <grin>

What is shown for the 'owner' useraame/groupname for files in that directory?

What does a long-form listing of the entry for the home-directory _itself_
show?  Specifically with regard to the 'owner' username and groupname?

> All users have quota, but for this particular user:
> # quota -v THATUSER
> responds
> quota: THATUSER: unknown user
> # edquota -u THATUSER
> edquota: THATUSER: no such user
> # repquota /home does not show that user anymore
> Other users, no problem
> So it seems that user is unknown to the system ??
> What can be the reason and how to solve ?

All of this suggests that user THATUSER is -not- the "name" that you "think"
it is.

Possibly that some glyph in THATUSER is not in the ASCII set, but is an
'extended' character  that 'looks like' an ASII symbol in what you are
keyboarding to represent THATUSER.

*OR* that there is 'whitespace' preceeding/following THATUSER.

*OR* that there is an embedded {char}[BS] sequence.

Does 'grep THATUSER /etc/passwd' produce a user line as you expect?

IF so, does 'grep THATUSER /etc/passwd | od -xc' show anything

How about the same checks on /etc/master.passwd ?

More information about the freebsd-questions mailing list