I recently opened my sudoers file and noticed the following:# Members of the admin group may gain root privileges%admin ALL=(ALL) ALL# Allow members of group sudo to execute any command%sudo ALL=(ALL:ALL) ALLIs there actually an effective difference between the privileges of admin and sudo groups? If so, what is it?
Is there a difference between gain root privileges and execute any command?
bash;sudo
That section refers to the Runas_Spec part of Sudo, which further details of can be found on the man page.In your example any members of the admin group may escalate to having sudo priveleges as any user, and members of the sudo group may escalate to having sudo priveleges as any user and group.Example below, I created 2 users and give them the different priveleges outline in your question;cat /etc/sudoers | grep ^testtest1   ALL=(ALL)   NOPASSWD: ALLtest2   ALL=(ALL:ALL)   NOPASSWD: ALLThen tested having them run commands as the apache user and group, notice the prompt for the password for user test1 when trying to run as the apache group;[test1@heisenbug root]$ sudo -u apache ping google.comPING google.com (74.125.230.233) 56(84) bytes of data.64 bytes from par08s10-in-f9.1e100.net (74.125.230.233): icmp_seq=1 ttl=63 time=36.2 ms--- google.com ping statistics ---1 packets transmitted, 1 received, 0% packet loss, time 0msrtt min/avg/max/mdev = 36.245/36.245/36.245/0.000 ms[test1@heisenbug root]$ sudo -g apache ping google.com[sudo] password for test1: [test2@heisenbug root]$ sudo -u apache ping google.comPING google.com (74.125.230.226) 56(84) bytes of data.64 bytes from lhr08s06-in-f2.1e100.net (74.125.230.226): icmp_seq=1 ttl=63 time=34.4 ms--- google.com ping statistics ---1 packets transmitted, 1 received, 0% packet loss, time 0msrtt min/avg/max/mdev = 34.465/34.465/34.465/0.000 ms[test2@heisenbug root]$ sudo -g apache ping google.comPING google.com (74.125.230.233) 56(84) bytes of data.64 bytes from lhr08s06-in-f9.1e100.net (74.125.230.233): icmp_seq=1 ttl=63 time=35.0 ms64 bytes from lhr08s06-in-f9.1e100.net (74.125.230.233): icmp_seq=2 ttl=63 time=33.5 ms--- google.com ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 1001msrtt min/avg/max/mdev = 33.575/34.308/35.042/0.756 msI can only imagine a very strict set of circumstances where this type of usage would be applicable.