Solved Error adding new user - pw: user 'anne' disappeared during update

k.jacker

Aspiring Daemon

Reaction score: 458
Messages: 740

Hei,

As root, I'm trying to add a new user with adduser but it returnes a strange error when I confirm.
Only the group 'anne' gets created, but nothing more. I checked pw(8) for something helpful as it seems like it's pw creating the error and checked /var/log/messages and /var/log/auth.log but nothing strange there.
Code:
Username   : anne
Password   : *****
Full Name  : Anne
Uid        : 2001
Class      :
Groups     : anne
Home       : /home/anne
Home Mode  :
Shell      : /bin/sh
Locked     : no
OK? (yes/no): yes
pw: user 'anne' disappeared during update
adduser: ERROR: There was an error adding user (anne).
Add another user? (yes/no): no
Goodbye!


Anyone who could help? Thanks!
Matthias
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,813
Messages: 34,975

Your databases are out of sync. Not sure how this happens but I get it from time to time too. Run /usr/sbin/pwd_mkdb -p /etc/master.passwd. Running vipw(8) and save-and-quit (without actually making any changes) also fixes it (easier to remember).
 
OP
k.jacker

k.jacker

Aspiring Daemon

Reaction score: 458
Messages: 740

Talking about quick help. Thank you SirDice, that worked :)
Solved
 

VASJD

New Member


Messages: 2

Your databases are out of sync. Not sure how this happens but I get it from time to time too. Run /usr/sbin/pwd_mkdb -p /etc/master.passwd. Running vipw(8) and save-and-quit (without actually making any changes) also fixes it (easier to remember).
Thank to you SirDice. I'm very glad with all of you in this list. I've been two times with a doubt and found a brilliant answer: and, of course, problem solution.
 

Mark Novem

New Member


Messages: 2

Just done my upgrade to the latest FreeBSD 6.7 version and when i try to install jenkins i stumbled to this problem. Thanks SirDice it did work on my problem.
 

scottro

Daemon

Reaction score: 629
Messages: 1,667

This just worked for me while upgrading packages on FreeBSD-12.2-RELEASE. Thanks, SirDice. Didn't try vipw, the pwd_mkdb fixed it.
 

richardtoohey2

Well-Known Member

Reaction score: 154
Messages: 333

This seems to happen consistently on a fresh install of FreeBSD 12.2 and installing MySQL 5.7 from ports - so make install is running, and at the end:
Code:
===>   Registering installation for mysql57-server-5.7.32
Installing mysql57-server-5.7.32...
===> Creating groups.
Creating group 'mysql' with gid '88'.
===> Creating users
Creating user 'mysql' with uid '88'.
pw: user 'mysql' disappeared during update
===> Creating homedir(s)
install: unknown user mysql
pkg-static: PRE-INSTALL script failed

This seems to get you back on track (well, worked for me):
Code:
# /usr/sbin/pwd_mkdb -p /etc/master.passwd
# make reinstall
 

mrredeyeflight

Member

Reaction score: 1
Messages: 83

Your databases are out of sync. Not sure how this happens but I get it from time to time too. Run /usr/sbin/pwd_mkdb -p /etc/master.passwd. Running vipw(8) and save-and-quit (without actually making any changes) also fixes it (easier to remember).
thank you for this. I appreicate it
 
Top