In a fresh install of Leap 16 Beta (installed on May 1st, updated today) I couldn’t login to the cockpit web console. I tried to login with the regular user and it said “Permission denied”.
journalctl system log
Mai 04 18:00:01 linux.fritz.box systemd[1]: Starting Dynamic user for /run/cockpit/wsinstance/ sockets...
Mai 04 18:00:01 linux.fritz.box systemd[1]: Started Timeline of Snapper Snapshots.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Finished Dynamic user for /run/cockpit/wsinstance/ sockets.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Starting Socket for Cockpit Web Service http instance...
Mai 04 18:00:01 linux.fritz.box systemd[1]: Starting Socket for Cockpit Web Service https instance factory...
Mai 04 18:00:01 linux.fritz.box systemd[1]: Listening on Socket for Cockpit Web Service http instance.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Listening on Socket for Cockpit Web Service https instance factory.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Starting Cockpit Web Service...
Mai 04 18:00:01 linux.fritz.box systemd[1]: Starting DBus interface for snapper...
Mai 04 18:00:01 linux.fritz.box systemd[1]: Started DBus interface for snapper.
Mai 04 18:00:01 linux.fritz.box systemd[1]: snapper-timeline.service: Deactivated successfully.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Started Cockpit Web Service.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Starting Dynamic user for /run/cockpit/session socket...
Mai 04 18:00:01 linux.fritz.box systemd[1]: Finished Dynamic user for /run/cockpit/session socket.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Starting Initiator socket for Cockpit sessions...
Mai 04 18:00:01 linux.fritz.box systemd[1]: Listening on Initiator socket for Cockpit sessions.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Started Cockpit Web Service http instance.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Created slice Slice /system/cockpit-session.
Mai 04 18:00:01 linux.fritz.box systemd[1]: Started Cockpit session 0/3648/0 (PID 3648/UID 0).
Mai 04 18:00:01 linux.fritz.box systemd[1]: cockpit-session@0-3648-0.service: Deactivated successfully.
Mai 04 18:00:12 linux.fritz.box systemd[1]: Started Cockpit session 1/3648/0 (PID 3648/UID 0).
Mai 04 18:00:12 linux.fritz.box systemd-logind[1166]: New session 4 of user achim.
Mai 04 18:00:12 linux.fritz.box systemd[1]: Started Session 4 of User achim.
Mai 04 18:00:12 linux.fritz.box cockpit-session[3700]: pam_unix(cockpit:session): session opened for user achim(uid=1000) by achim(uid=0)
Mai 04 18:00:12 linux.fritz.box systemd[1]: cockpit-session@1-3648-0.service: Deactivated successfully.
Mai 04 18:00:12 linux.fritz.box systemd-logind[1166]: Session 4 logged out. Waiting for processes to exit.
Mai 04 18:00:12 linux.fritz.box systemd[1]: session-4.scope: Deactivated successfully.
Mai 04 18:00:12 linux.fritz.box systemd-logind[1166]: Removed session 4.
Mai 04 18:00:14 linux.fritz.box systemd[1]: Starting SETroubleshoot daemon for processing new SELinux denial logs...
Mai 04 18:00:14 linux.fritz.box systemd[1]: Started SETroubleshoot daemon for processing new SELinux denial logs.
Mai 04 18:00:14 linux.fritz.box systemd[1]: Created slice Slice /system/dbus-:1.2-org.fedoraproject.SetroubleshootPrivileged.
Mai 04 18:00:14 linux.fritz.box systemd[1]: Started dbus-:1.2-org.fedoraproject.SetroubleshootPrivileged@0.service.
Mai 04 18:00:15 linux.fritz.box setroubleshoot[3728]: SELinux is preventing cockpit-session from using the transition access on a process. For complete SELinux messages run: sealert -l 23531a46-f807-43f8-a50c-4fe1a73e7586
Mai 04 18:00:15 linux.fritz.box setroubleshoot[3728]: SELinux is preventing cockpit-session from using the transition access on a process.
***** Plugin catchall_boolean (89.3 confidence) suggests ******************
If you want to allow unconfined to service transition to unconfined user
Then you must tell SELinux about this by enabling the 'unconfined_service_transition_to_unconfined_user' boolean.
Do
setsebool -P unconfined_service_transition_to_unconfined_user 1
***** Plugin catchall (11.6 confidence) suggests **************************
If you believe that cockpit-session should be allowed transition access on processes labeled unconfined_t by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'cockpit-session' --raw | audit2allow -M my-cockpitsession
# semodule -X 300 -i my-cockpitsession.pp
Mai 04 18:00:25 linux.fritz.box systemd[1]: dbus-:1.2-org.fedoraproject.SetroubleshootPrivileged@0.service: Deactivated successfully.
Mai 04 18:00:26 linux.fritz.box systemd[1]: setroubleshootd.service: Deactivated successfully.
Mai 04 18:00:35 linux.fritz.box sudo[3744]: achim : TTY=pts/0 ; PWD=/home/achim ; USER=root ; COMMAND=/usr/bin/journalctl --since '2 minutes ago'
Mai 04 18:00:35 linux.fritz.box sudo[3744]: pam_unix(sudo:session): session opened for user root(uid=0) by achim(uid=1000)
SELinux sealert
SELinux is preventing cockpit-session from using the transition access on a process.
***** Plugin catchall_boolean (89.3 confidence) suggests ******************
If you want to allow unconfined to service transition to unconfined user
Then you must tell SELinux about this by enabling the 'unconfined_service_transition_to_unconfined_user' boolean.
Do
setsebool -P unconfined_service_transition_to_unconfined_user 1
***** Plugin catchall (11.6 confidence) suggests **************************
If you believe that cockpit-session should be allowed transition access on processes labeled unconfined_t by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'cockpit-session' --raw | audit2allow -M my-cockpitsession
# semodule -X 300 -i my-cockpitsession.pp
Additional Information:
Source Context system_u:system_r:unconfined_service_t:s0
Target Context unconfined_u:unconfined_r:unconfined_t:s0
Target Objects /usr/bin/bash [ process ]
Source cockpit-session
Source Path cockpit-session
Port <Unknown>
Host linux.fritz.box
Source RPM Packages
Target RPM Packages bash-5.2.37-160000.3.8.x86_64
SELinux Policy RPM selinux-policy-targeted-20241031+git516.1a75276b-
160000.1.15.noarch
Local Policy RPM selinux-policy-targeted-20241031+git516.1a75276b-
160000.1.15.noarch
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name linux.fritz.box
Platform Linux linux.fritz.box 6.12.0-160000.9-default #1
SMP PREEMPT_DYNAMIC Mon Mar 24 17:07:41 UTC 2025
(0d0bca0) x86_64 x86_64
Alert Count 12
First Seen 2025-05-02 01:02:03 CEST
Last Seen 2025-05-04 18:00:12 CEST
Local ID 23531a46-f807-43f8-a50c-4fe1a73e7586
Raw Audit Messages
type=AVC msg=audit(1746374412.268:189): avc: denied { transition } for pid=3704 comm="cockpit-session" path="/usr/bin/bash" dev="dm-0" ino=20367 scontext=system_u:system_r:unconfined_service_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0 tclass=process permissive=0
Hash: cockpit-session,unconfined_service_t,unconfined_t,process,transition
I applied the suggested setting:
sudo setsebool -P unconfined_service_transition_to_unconfined_user 1
and now I can login to the cockpit.
Is this a proper solution?
Best regards,
Achim
PS: there was no Leap-16-beta tag, so I used the alpha tag.