Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

Or

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

 
discard

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