Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Interestingly, if the sysadm_u user can change to root via sudo -i, they *can* run the authconfig command while running a root shell:
> sudo authconfig --test
[sudo] password for user:
sudo: unable to execute /sbin/authconfig: Permission denied
> sudo -i> whoami
root
> id -Z
sysadm_u:sysadm_r:sysadm_t:s0
> authconfig --test
Running authconfig compatibility tool.
[...]
Why would that be the case?
Will be resolved by labeling
/usr/lib/python3.6/site-packages/authselect/authcompat.py
but in RHEL 8 only as there is no authselect-compat in current releases.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (selinux-policy bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:1995
Description of problem: Executing "sudo authconfig" as a confined user ends up having a Permission denied + AVC: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- $ sudo authconfig --test [sudo] password for staff: sudo: unable to execute /sbin/authconfig: Permission denied -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- AVC: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- time->Fri Jan 22 09:03:35 2021 type=PROCTITLE msg=audit(1611302615.729:148): proctitle=7375646F0061757468636F6E666967002D2D74657374 type=SYSCALL msg=audit(1611302615.729:148): arch=c000003e syscall=59 success=no exit=-13 a0=559e79623e78 a1=559e7961de78 a2=559e79673930 a3=1 items=0 ppid=1963 pid=1987 auid=1001 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=4 comm="sudo" exe="/usr/bin/sudo" subj=staff_u:staff_r:staff_sudo_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(1611302615.729:148): avc: denied { execute_no_trans } for pid=1987 comm="sudo" path="/usr/lib/python3.6/site-packages/authselect/authcompat.py" dev="dm-0" ino=18148211 scontext=staff_u:staff_r:staff_sudo_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file permissive=0 -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- The reason for this is having /sbin/authconfig be a symlink to /usr/lib/python3.6/site-packages/authselect/authcompat.py which is labeled with lib_t, preventing the execution by staff_sudo_t. Same happens when being sysadm_sudo_t. Version-Release number of selected component (if applicable): authselect-compat-1.2.1-2.el8.x86_64 How reproducible: Always Steps to Reproduce: 1. Create a confined user that can sudo # useradd -Z staff_u -G wheel staff # echo "pass" | passwd --stdin staff 2. Switch to the user # ssh staff@localhost staff@localhost's password: pass $ id -Z staff_u:staff_r:staff_t:s0-s0:c0.c1023 3. Execute authconfig through sudo $ sudo authconfig --test [sudo] password for staff: pass sudo: unable to execute /sbin/authconfig: Permission denied Actual results: sudo: unable to execute /sbin/authconfig: Permission denied + AVC Expected results: works fine