- Apr 2021
-
www.mankier.com www.mankier.com
-
If no Runas_Spec is specified the command may be run as root and no group may be specified.
Incorrect. In my testing, if no
Runas_Spec
is specified the command may be run as any user and the -g option may be specified to select any of the target user's groups.If no
Runas_Spec
is specified it is the same as(ALL)
. https://unix.stackexchange.com/a/13053 But if your intent is "execute as root", put(root)
. -
The second defines a list of groups that can be specified via the -g option in addition to any of the target user's groups.
Note that is says in addition. This implies that, without specifying the second
Runas_list
, the target user's groups (the user's primary group and any supplementary groups to which the user belongs) can still be specified via the-g
option. I confirm this on my Fedora 34 system. -
If only the first is specified, the command may be run as any user in the list but no -g option may be specified.
This part:
but no
-g
option may be specifiedis incorrect. The
-g
option may still be specified to select any of the target user's groups (the user's primary group and any supplementary groups to which the user belongs).
-