Ubuntu: root Missing from /etc/group Problem
It seems that some installs of Ubuntu (I'm talking about 10.04, before 10.04.1, perhaps earlier) lack a root user in /etc/group. The two errors I have recently seen that have been plagued by this issue are one regarding "/tmp/.X11-unix" (bug 623294 on Launchpad), wherein at some point an apt update/ugrade is run and then one no longer has access to their graphical front end. For the systems I administer, the symptom seemed to be sitting on the window where X loads... X never loads, so the graphics card gets really, really hot over the duration of failed initializations.
The other problem I've run into that has been solved by adding root to /etc/group is "dpkg-statoverrides: syntax error: unknown group 'root' in statoverride file"; in my case the package that could not be updated was hplip. I have had to address this issue twice, and in both cases root was missing from /etc/group.
Short instructions:
First, cat or less your /etc/group
Scroll to the top of the list; if there's no "root:x:0:", add it by running sudo vigr. (You may also use your favorite text editor, but why you would want to use anything but vi makes the mind wobble.)
Type gg to get to the top of the file, then type O to insert a new line above the current line and go into text insert mode. Type root:x:0: and hit ESC. Smile (because you're happy to be using vi and/or using linux) and type :x to save and exit out of vigr.
If your problem is with X, reboot. If your problem is with dpkg or aptitude, running the usual apt commands should now work.
I recommend using vigr to edit /etc/group with vi (duh). I also take no responsibility if this advice breaks your box (it shouldn't).
More: Full Post and Comments