Solved pw: user 'postfix' disappeared during update

kjpetrie

Active Member

Reaction score: 6
Messages: 122

While installing mail/postfix I saw the following output:
Code:
===> Creating groups.
Using existing group 'mail'.
Using existing group 'maildrop'.
Using existing group 'postfix'.
===> Creating users
Creating user 'postfix' with uid '125'.
pw: user 'postfix' disappeared during update
install: unknown user postfix
[mailin] [1/1] Extracting postfix-3.4.6,1: 100%
chown: postfix: illegal user name
The directories in /var/spool/postfix are still owned by root, so I tried to run chmod manually, but got the same error.

grep postfix /etc/passwd produces:
Code:
postfix:*:125:125:Postfix Mail System:/var/spool/postfix:/usr/sbin/nologin
as expected, but although chmod 125 /var/spool/postfix/* changed the ownership to '125' the number was displayed rather than the name.

Finally, I tried to use adduser and specified the information from the passwd file, but this once again produced:
Code:
Username: postfix
Full name: Postfix Mail System
Uid (Leave empty for default): 125
Login group [postfix]:
Login group is postfix. Invite postfix into other groups? []: mail
Login class [default]:
Shell (sh csh tcsh nologin) [sh]: /usr/sbin/nologin
Home directory [/home/postfix]: /var/spool/postfix
Home directory permissions (Leave empty for default): 0755
Use password-based authentication? [yes]: no
Lock out the account after creation? [no]:
Username   : postfix
Password   : <disabled>
Full Name  : Postfix Mail System
Uid        : 125
Class      :
Groups     : postfix mail
Home       : /var/spool/postfix
Home Mode  : 0755
Shell      : /usr/sbin/nologin
Locked     : no
OK? (yes/no): yes
pw: user 'postfix' disappeared during update
adduser: ERROR: There was an error adding user (postfix).
How can I set up the postfix user correctly?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,050
Messages: 31,633

Code:
pw: user 'postfix' disappeared during update
This sometimes happens, not sure why but I get it from time to time too. If you search the forums you'll find similar errors. It's not related to any specific user account, it can happen to any. The problem here is that /etc/passwd got out of sync with /etc/master.passwd. A pwd_mkdb -p /etc/master.passwd will fix this.
 
OP
OP
K

kjpetrie

Active Member

Reaction score: 6
Messages: 122

Yes, that fixed it. Didn't even have to repeat the chown.

I searched for the string but evidently no one has posted this with the same user before.
 
Top