How to Regain 'Lost' User?

Jan Grant Jan.Grant at bristol.ac.uk
Tue Apr 29 05:43:57 PDT 2003


On Mon, 28 Apr 2003, Jud wrote:

> Was puttering along changing shells from sh to zsh for root and user,
> using chpass -s.  This went off without a hitch for root.  Then
> unaccountably (typo?), when trying the same for user, I received a
> response that the user was unknown.
>
> When I try to create a new user with pw, I'm told a user with this
> name already exists.  When I try to delete the user, I'm told there is
> no such user.  Same with sysinstall - gave an error (74) when I tried
> to (re)create the user.  I've also attempted to delete the relevant
> entries from the passwd, master.passwd and group files.  After those
> deletions, trying to add a user with sysinstall or pw results in an
> error message about user being dropped or lost during the operation
> (sorry, can't remember the exact wording as I sit here on lunch
> break).
>
> So rather than continuing to flail about, where should I look for
> information about what to do?

You may want to check your /etc/master.passwd file (use vipw) to see if
there's a problem there. Also read the man page for pwd_mkdb (8): you
may find you can fix things by simply doing

# pwd_mkdb -p



-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Work #90: As many pseudo-intellectual sycophants as necessary to make one
inarticulate scotsman think he's a genius in command of The Profound.



More information about the freebsd-questions mailing list