CentOS Root Group – What Does It Mean to Be in Group 0?

centosgrouproot

Several users in a system I inherited have their group set to 0 in /etc/passwd. What does that mean? Do they essentially get full root privileges?

The system is running CentOS 5, and the users appear to be primarily system-related things, although a former administrator is also in that group:

$ grep :0: /etc/passwd
root:x:0:0:root:/root:/bin/bash
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
operator:x:11:0:operator:/root:/sbin/nologin
jsmith:x:500:0:Joe Smith:/home/jsmith:/bin/bash
$

Best Answer

Unlike user 0 (the root user), group 0 does not have any special privilege at the kernel level.

Traditionally, group 0 had special privileges on many unix variants — either the right to use su to become root (after typing the root password), or the right to become root without typing a password. Basically, the users in group 0 were the system administrators. When group 0 has special privileges, it is called wheel

Under Linux, group 0 does not have any special meaning to privilege escalation utilities such as sudo and su, either. See Why is Debian not creating the 'wheel' group by default?

Under CentOS, as far as I know, group 0 has no special significance. It is not referenced in the default sudoers file. The administrators on that system may have decided to emulate a unix tradition and confer members of group 0 some special permissions. Check the PAM configuration (/etc/pam.conf, /etc/pam.d/*) and the sudoers file (/etc/sudoers) (these are not the only places where group 0 might have been conferred special privileges, but the most likely).

Related Question