[GH-ISSUE #4931] SELinux prevents SSH access on Alma #10140

Open
opened 2026-08-05 01:24:47 -04:00 by saavagebueno · 3 comments
Owner

Originally created by @iamtimmy on GitHub (Dec 9, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4931

Issue extremely similar to existing but closed #3062

Describe the problem

It appears that SELinux is preventing login from accessing bash when trying to SSH to a peer.

To Reproduce

Using Almalinux 10.1

Steps to reproduce the behavior:
netbird ssh user@box

Error:

Waiting for authentication...
Authentication successful!
Last login: Tue Dec 9 <localtime> from <origin>
user: no shell: Permission denied

Expected behavior

Access to bash should happen so a SSH session can begin. It appears the login happens but the process login can't access bash therefore the error user: no shell: Permission denied occurs.

A clear and concise description of what you expected to happen.

SELinux Report

SELinux is preventing /usr/bin/login from using the transition access on a process.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that login 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 'login' --raw | audit2allow -M my-login
# semodule -X 300 -i my-login.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                        login
Source Path                   /usr/bin/login
Port                          <Unknown>
Host                          dev-vm
Source RPM Packages           util-linux-2.40.2-13.el10.x86_64
Target RPM Packages           bash-5.2.26-6.el10.x86_64
SELinux Policy RPM            selinux-policy-targeted-42.1.7-1.el10.noarch
Local Policy RPM              selinux-policy-targeted-42.1.7-1.el10.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     dev-vm
Platform                      Linux dev-vm 6.12.0-124.13.1.el10_1.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Dec  4 06:13:29 EST 2025
                              x86_64
Alert Count                   7
First Seen                    2025-12-09 18:42:22 CET
Last Seen                     2025-12-09 19:29:37 CET
Local ID                      90cff5c6-f96b-4d66-8813-aa6d2b4b9df4

Raw Audit Messages
type=AVC msg=audit(1765304977.477:1480): avc:  denied  { transition } for  pid=28416 comm="login" path="/usr/bin/bash" dev="dm-0" ino=33780712 scontext=system_u:system_r:unconfined_service_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0 tclass=process permissive=0


type=SYSCALL msg=audit(1765304977.477:1480): arch=x86_64 syscall=execve success=no exit=EACCES a0=55e0b7416ef4 a1=7ffe52317518 a2=55e0b742a520 a3=55e0b73dfe80 items=0 ppid=28414 pid=28416 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=pts1 ses=28 comm=login exe=/usr/bin/login subj=system_u:system_r:unconfined_service_t:s0 key=(null)

Hash: login,unconfined_service_t,unconfined_t,process,transition

Are you using NetBird Cloud?

self-host NetBird's control plane

NetBird version

0.60.7

Originally created by @iamtimmy on GitHub (Dec 9, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4931 Issue extremely similar to existing but closed #3062 **Describe the problem** It appears that SELinux is preventing login from accessing bash when trying to SSH to a peer. **To Reproduce** Using Almalinux 10.1 Steps to reproduce the behavior: `netbird ssh user@box` Error: ``` Waiting for authentication... Authentication successful! Last login: Tue Dec 9 <localtime> from <origin> user: no shell: Permission denied ``` **Expected behavior** Access to bash should happen so a SSH session can begin. It appears the login happens but the process login can't access bash therefore the error `user: no shell: Permission denied` occurs. A clear and concise description of what you expected to happen. **SELinux Report** ``` SELinux is preventing /usr/bin/login from using the transition access on a process. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that login 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 'login' --raw | audit2allow -M my-login # semodule -X 300 -i my-login.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 login Source Path /usr/bin/login Port <Unknown> Host dev-vm Source RPM Packages util-linux-2.40.2-13.el10.x86_64 Target RPM Packages bash-5.2.26-6.el10.x86_64 SELinux Policy RPM selinux-policy-targeted-42.1.7-1.el10.noarch Local Policy RPM selinux-policy-targeted-42.1.7-1.el10.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name dev-vm Platform Linux dev-vm 6.12.0-124.13.1.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 4 06:13:29 EST 2025 x86_64 Alert Count 7 First Seen 2025-12-09 18:42:22 CET Last Seen 2025-12-09 19:29:37 CET Local ID 90cff5c6-f96b-4d66-8813-aa6d2b4b9df4 Raw Audit Messages type=AVC msg=audit(1765304977.477:1480): avc: denied { transition } for pid=28416 comm="login" path="/usr/bin/bash" dev="dm-0" ino=33780712 scontext=system_u:system_r:unconfined_service_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0 tclass=process permissive=0 type=SYSCALL msg=audit(1765304977.477:1480): arch=x86_64 syscall=execve success=no exit=EACCES a0=55e0b7416ef4 a1=7ffe52317518 a2=55e0b742a520 a3=55e0b73dfe80 items=0 ppid=28414 pid=28416 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=pts1 ses=28 comm=login exe=/usr/bin/login subj=system_u:system_r:unconfined_service_t:s0 key=(null) Hash: login,unconfined_service_t,unconfined_t,process,transition ``` **Are you using NetBird Cloud?** self-host NetBird's control plane **NetBird version** `0.60.7`
saavagebueno added the triage-needed label 2026-08-05 01:24:47 -04:00
Author
Owner

@Micorksen commented on GitHub (Jan 7, 2026):

Hello @iamtimmy,

I also encountered the same problem on AlmaLinux 9.7.
For me, the following command worked like a charm: semanage permissive -a unconfined_service_t.

I do not know if it is the best method, but at least it just works.

<!-- gh-comment-id:3719896277 --> @Micorksen commented on GitHub (Jan 7, 2026): Hello @iamtimmy, I also encountered the same problem on AlmaLinux 9.7. For me, the following command worked like a charm: `semanage permissive -a unconfined_service_t`. I do not know if it is the best method, but at least it just works.
Author
Owner

@eg36 commented on GitHub (Mar 27, 2026):

Hello @iamtimmy and @Micorksen
late to the party,

ausearch -c 'login' --raw | audit2allow -M my-login

and

semodule -X 300 -i my-login.pp

will do the job.

<!-- gh-comment-id:4146018394 --> @eg36 commented on GitHub (Mar 27, 2026): Hello @iamtimmy and @Micorksen late to the party, `ausearch -c 'login' --raw | audit2allow -M my-login` and `semodule -X 300 -i my-login.pp` will do the job.
Author
Owner

@acidRain-burns commented on GitHub (Jun 1, 2026):

Not sure which issue should be used, since they stated they were willing to reopen, so will leave this here too.

I can confirm this is still affecting at least Fedora with SELinux:

  • os: Fedora Linux 44 (Server Edition)
  • kernel: Linux 7.0.10-200.fc44.x86_64
  • netbird: 0.71.4
ssh <username>@<hostname>.netbird.local
SSH authentication required.
Please do the SSO login in your browser.
If your browser didn't open automatically, use this URL to log in:

https://netbird.url/oauth2/device?login_hint=email%40example.com&user_code=XXXX-XXXX
Or visit: https://netbird.url/oauth2/device?login_hint=email%40example.com and enter code: XXXX-XXXX

Waiting for authentication...
<username>: no shell: Permission denied

The netbird ssh in the web UI also fails.

This behavior does not occur with the exact same setup running slackware or ubuntu server in the same self-hosted netbird network (they work as expected).

Running grep "SELinux is preventing" /var/log/messages gives me many messages, all duplicates of the following:

Jun  1 09:53:45 <hostname> setroubleshoot[55115]: SELinux is preventing login from using the transition access on a process. For complete SELinux messages run: sealert -l 937c4e6f-70aa-46e3-92f1-3cae648968ea
Jun  1 09:53:45 <hostname> setroubleshoot[55115]: SELinux is preventing login from using the transition access on a process.#012#012*****  Plugin catchall (100. confidence) suggests   **************************#012#012If you believe that login should be allowed transition access on processes labeled unconfined_t by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# ausearch -c 'login' --raw | audit2allow -M my-login#012# semodule -X 300 -i my-login.pp#012

Running sealert -l 937c4e6f-70aa-46e3-92f1-3cae648968ea returned:

SELinux is preventing login from using the transition access on a process.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that login 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 'login' --raw | audit2allow -M my-login
# semodule -X 300 -i my-login.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                        login
Source Path                   login
Port                          <Unknown>
Host                         <hostname>
Source RPM Packages
Target RPM Packages           bash-5.3.9-3.fc44.x86_64
SELinux Policy RPM            selinux-policy-targeted-44.1-1.fc44.noarch
Local Policy RPM              selinux-policy-targeted-44.1-1.fc44.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     <hostname>
Platform                      Linux <hostname>
                              7.0.10-200.fc44.x86_64 #1 SMP PREEMPT_DYNAMIC Sat
                              May 23 15:20:08 UTC 2026 x86_64
Alert Count                   14
First Seen                    2026-05-31 10:13:34 PDT
Last Seen                     2026-06-01 09:53:41 PDT
Local ID                      937c4e6f-70aa-46e3-92f1-3cae648968ea

Raw Audit Messages
type=AVC msg=audit(1780332821.975:2491): avc:  denied  { transition } for  pid=55113 comm="login" path="/usr/bin/bash" dev="dm-0" ino=1509 scontext=system_u:system_r:unconfined_service_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0 tclass=process permissive=0


Hash: login,unconfined_service_t,unconfined_t,process,transition

@eg36 's solution worked for me. A more automated/steamlined solution or at the least a note of this on SELinux systems post netbird client install would be appreciated.

<!-- gh-comment-id:4594945224 --> @acidRain-burns commented on GitHub (Jun 1, 2026): Not sure which issue should be used, since they stated they were willing to reopen, so will leave this here too. I can confirm this is still affecting at least Fedora with SELinux: - os: `Fedora Linux 44 (Server Edition)` - kernel: `Linux 7.0.10-200.fc44.x86_64` - netbird: `0.71.4` ``` ssh <username>@<hostname>.netbird.local SSH authentication required. Please do the SSO login in your browser. If your browser didn't open automatically, use this URL to log in: https://netbird.url/oauth2/device?login_hint=email%40example.com&user_code=XXXX-XXXX Or visit: https://netbird.url/oauth2/device?login_hint=email%40example.com and enter code: XXXX-XXXX Waiting for authentication... <username>: no shell: Permission denied ``` The netbird ssh in the web UI also fails. This behavior does not occur with the exact same setup running slackware or ubuntu server in the same self-hosted netbird network (they work as expected). Running `grep "SELinux is preventing" /var/log/messages` gives me many messages, all duplicates of the following: ``` Jun 1 09:53:45 <hostname> setroubleshoot[55115]: SELinux is preventing login from using the transition access on a process. For complete SELinux messages run: sealert -l 937c4e6f-70aa-46e3-92f1-3cae648968ea Jun 1 09:53:45 <hostname> setroubleshoot[55115]: SELinux is preventing login from using the transition access on a process.#012#012***** Plugin catchall (100. confidence) suggests **************************#012#012If you believe that login should be allowed transition access on processes labeled unconfined_t by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# ausearch -c 'login' --raw | audit2allow -M my-login#012# semodule -X 300 -i my-login.pp#012 ``` Running `sealert -l 937c4e6f-70aa-46e3-92f1-3cae648968ea` returned: ``` SELinux is preventing login from using the transition access on a process. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that login 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 'login' --raw | audit2allow -M my-login # semodule -X 300 -i my-login.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 login Source Path login Port <Unknown> Host <hostname> Source RPM Packages Target RPM Packages bash-5.3.9-3.fc44.x86_64 SELinux Policy RPM selinux-policy-targeted-44.1-1.fc44.noarch Local Policy RPM selinux-policy-targeted-44.1-1.fc44.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name <hostname> Platform Linux <hostname> 7.0.10-200.fc44.x86_64 #1 SMP PREEMPT_DYNAMIC Sat May 23 15:20:08 UTC 2026 x86_64 Alert Count 14 First Seen 2026-05-31 10:13:34 PDT Last Seen 2026-06-01 09:53:41 PDT Local ID 937c4e6f-70aa-46e3-92f1-3cae648968ea Raw Audit Messages type=AVC msg=audit(1780332821.975:2491): avc: denied { transition } for pid=55113 comm="login" path="/usr/bin/bash" dev="dm-0" ino=1509 scontext=system_u:system_r:unconfined_service_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0 tclass=process permissive=0 Hash: login,unconfined_service_t,unconfined_t,process,transition ``` @eg36 's solution worked for me. A more automated/steamlined solution or at the least a note of this on SELinux systems post netbird client install would be appreciated.
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#10140