Confined sysadm users cannot execute administrative commands using `sudo`, "sesh: unable to execute <command>: Permission denied" is printed
Issue
-
When a user is confined to
staff_u
SELinux user and switches role tosysadm_r
while trying to execute an administrative command undersudo
, e.g./sbin/postsuper
, the following error is returned$ sudo -r sysadm_r /sbin/postsuper sesh: unable to execute /sbin/postsuper: Permission denied
-
Same issue happens for
staff_u
SELinux users which automatically switch role tosysadm_r
when executingsudo
Environment
- Red Hat Enterprise Linux 8
- confined
staff_u
users - selinux
- sudo
- confined
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.