Unknown user in statoverride file

I know this question is a little old, but have come across this twice now. Once with puppet, once with virtualbox. It cropped up again and I found something that worked. It's a variation on serverfault.com.

Instead of relying on dpkg-statoverride --remove /path/to/offending/file.ext which, throws the error

dpkg: unrecoverable fatal error, aborting:
syntax error: unknown group offendinggroup in statoverride file

You can get fancy with sed, or you can simply open /var/lib/dpkg/statoverride in your favorite text editor and remove only the lines containing the item(s) that were causing the error. I found that this is a documented bug, for both Debian, and Ubuntu,

  • https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/593615
  • https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705752

That said, I just fixed mine by manually editing out any entry that threw an error, and I am happily downloading packages again. Hope this helps the next person, who visits this number 1 Google search result for this problem.


While I can't answer your question as asked I can help you with your dilemma. I experienced the exact same problem you are having after using 'User Accounts' to remove user 'backuppc' - a user I manually configured for backups. Well I scrapped that route but didn't try to remove the user until a couple weeks later (IE - today). I hadn't been experiencing any trouble until Update Manager found and tried to apply updates; the process would fail reading

dpkg: unrecoverable fatal error, aborting:  
 syntax error: unknown user 'backuppc' in statoverride file
W: Waited for dpkg --assert-multi-arch but it wasn't there - dpkgGo (10: No child processes)
E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install.  Trying to recover:

After some searching I found a solution.

x@y ~ $ cat /var/lib/dpkg/statoverride
root postdrop 2555 /usr/sbin/postdrop
root postdrop 2555 /usr/sbin/postqueue
root mlocate 2755 /usr/bin/mlocate
postfix postdrop 2710 /var/spool/postfix/public
backuppc www-data 4750 /usr/lib/backuppc/cgi-bin/index.cgi
root ssl-cert 710 /etc/ssl/private
root crontab 2755 /usr/bin/crontab

Fixed by running: sudo sed -i '/backuppc/d' /var/lib/dpkg/statoverride

x@y ~ $ sudo sed -i '/backuppc/d' /var/lib/dpkg/statoverride; cat /var/lib/dpkg/statoverride
[sudo] password for x: 
root postdrop 2555 /usr/sbin/postdrop
root postdrop 2555 /usr/sbin/postqueue
root mlocate 2755 /usr/bin/mlocate
postfix postdrop 2710 /var/spool/postfix/public
root ssl-cert 710 /etc/ssl/private
root crontab 2755 /usr/bin/crontab

Sorry I'm not able to answer your question, but this was the second result in google so I wanted to put a solution here for people. My answer originated from http://rickfoosusa.blogspot.com/2012/04/howto-ubuntu-unknown-user-in.html.


I was getting following error:

dpkg: unrecoverable fatal error, aborting:
syntax error: unknown group "crontab" in statoverride file,
 E: Sub-process /usr/bin/dpkg returned an error code (2)
dpkg: unrecoverable fatal error, aborting:
 unknown group 'messagebus' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)

Below command solved my apt-get install problem

sudo sed -i '/crontab/d' /var/lib/dpkg/statoverride

You can change the crontab word but keep the '/d' until you can successfully install any apt-get without any syntax error.

root@localhost:~# sudo sed -i '/messagebus/d' /var/lib/dpkg/statoverride
root@localhost:~# apt-get install wifite
Reading package lists... Done

Tags:

Dpkg

Users