Skip to content

Instantly share code, notes, and snippets.

@hkoba
Created May 11, 2022 06:14
Show Gist options
  • Save hkoba/103ebd7aabb0c2e4546f879d3713ae0c to your computer and use it in GitHub Desktop.
Save hkoba/103ebd7aabb0c2e4546f879d3713ae0c to your computer and use it in GitHub Desktop.
After dnf system-upgrade (from f34) to fedora36 + SELinux relabel, my linux system start refusing my login
5月 11 14:51:41 chtholly.localdomain audit[13462]: USER_ACCT pid=13462 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="hkoba" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
5月 11 14:51:41 chtholly.localdomain audit[13462]: CRED_ACQ pid=13462 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 msg='op=PAM:setcred grantors=? acct="hkoba" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
5月 11 14:51:41 chtholly.localdomain audit[13462]: USER_ROLE_CHANGE pid=13462 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 msg='pam: default-context=unconfined_u:unconfined_r:unconfined_t:s0 selected-context=unconfined_u:unconfined_r:unconfined_t:s0 exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
5月 11 14:51:41 chtholly.localdomain audit[13462]: USER_START pid=13462 uid=0 auid=1000 ses=4 subj=system_u:system_r:kernel_t:s0 msg='op=PAM:session_open grantors=pam_selinux,pam_selinux,pam_loginuid,pam_namespace,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="hkoba" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
5月 11 14:51:41 chtholly.localdomain systemd[13462]: pam_unix(systemd-user:session): session opened for user hkoba(uid=1000) by (uid=0)
5月 11 14:51:41 chtholly.localdomain audit[13462]: AVC avc: denied { transition } for pid=13462 comm="(systemd)" path="/usr/lib/systemd/systemd" dev="dm-1" ino=271043 scontext=system_u:system_r:kernel_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0 tclass=process permissive=0
5月 11 14:51:41 chtholly.localdomain systemd[13462]: user@1000.service: Failed to execute /usr/lib/systemd/systemd: Permission denied
5月 11 14:51:41 chtholly.localdomain systemd[13462]: user@1000.service: Failed at step EXEC spawning /usr/lib/systemd/systemd: Permission denied
5月 11 14:51:41 chtholly.localdomain systemd[1]: user@1000.service: Main process exited, code=exited, status=203/EXEC
5月 11 14:51:41 chtholly.localdomain systemd[1]: user@1000.service: Failed with result 'exit-code'.
@hkoba
Copy link
Author

hkoba commented May 11, 2022

% ls -Z /usr/lib/systemd/systemd
system_u:object_r:lib_t:s0 /usr/lib/systemd/systemd

This should be labeled as system_u:object_r:init_exec_t:s0, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment