I would like to run a command with temporary group membership but it seems that I don't have permission to do that. As an example, if I run sudo -g internet ls
, I get the message Sorry, user rudivonstaden is not allowed to execute '/bin/ls' as rudivonstaden:internet on rudivonstaden-desktop
.
In my limited understanding, this should be governed by the /etc/sudoers
file, potentially modified by files in /etc/sudoers.d
. The latter folder only contains the README file, and the sudoers file has the following:
root ALL=(ALL:ALL) ALL
%sudo ALL=(ALL:ALL) ALL
As far as I can tell, that should allow any sudo user to run any file as any group using the -g option. Is there a bug somewhere, or am I missing something?