Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to find a group in linux that doesn't appear in my /etc/groups file.

I run the following command and get an error

sudo adduser --disabled-login --gecos 'GitLab' git
adduser: The group `git' already exists. 

Yet when I run the following command, there is no group git

cat /etc/group | grep  git
#no results
cat /etc/passwd | grep git
#no results
cat /etc/shaddow |grep git
#no results

This is a brand new Ubuntu 12.04 box with no changes except it was tied to LDAP. Haven't even installed vim or git yet.

Why am I getting the error the group git already exists? And is there any way around it? I want to install gitlab.

share|improve this question

Check /etc/nsswitch.conf, specifically the groups line. Also check the output of

$ getent groups git

To find out why you get the error about the group already existing.

Reference: man nsswitch.conf(5) and man getent(1)

share|improve this answer

Try just adding them into this group that it thinks is there

sudo adduser --disabled-login --gecos 'GitLab' git git


sudo adduser --disabled-login --gecos 'GitLab' --ingroup git git

You could also try to delete the group and see what happens

groupdel git
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.