/etc/group returned error code 10

August 5, 2016 598 views
Email

Hi I just tried to install Postfix but came across an error with /etc/group, permissions denied.

root@ubuntu-512mb-lon1-01zarlo:~# sudo apt-get install postfix
Reading package lists... Done
Building dependency tree       
Reading state information... Done
postfix is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 76 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up postfix (2.11.0-1ubuntu1) ...
Adding group `postfix' (GID 116) ...
groupadd: cannot open /etc/group
addgroup: `/usr/sbin/groupadd -g 116 postfix' returned error code 10. Exiting.
dpkg: error processing package postfix (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@ubuntu-512mb-lon1-01zarlo:~# sudo addgroup --gid 116 postfix --force-badname
Adding group `postfix' (GID 116) ...
groupadd: cannot open /etc/group
addgroup: `/usr/sbin/groupadd -g 116 postfix' returned error code 10. Exiting.
root@ubuntu-512mb-lon1-01zarlo:~# 

1 comment
  • Hi! Have you modified /etc/groups in any way? Please post the output of the following two commands:

    sudo ls -lah /etc/groups
    sudo stat /etc/groups
    
1 Answer

Hi thanks for your response, it's much appreciated.

I managed to fix it by finding the blog linked here; http://blog.sina.com.cn/s/blog_6f704fa90101hbar.html

Have another answer? Share your knowledge.