хочу запустить программу с GID отличным от «основного». В «man sudo» по этому поводу написано
-g group Normally, sudo sets the primary group to the one specified by the passwd database for the user the command is being run as (by
default, root). The -g (group) option causes sudo to run the specified command with the primary group set to group.
# sudo -g pkcs11 id -g
Sorry, user root is not allowed to execute '/usr/bin/id -g' as root:pkcs11 on localhost.localdomain.
# grep root /etc/sudoers
root ALL=(ALL) ALL
# groups root
root : root pkcs11