After upgrading to Leap 16, I was not able to log to the graphical user interface anymore and ssh access would not work either (loging to the console would work). After some long search, I figured out that this was related to Selinux.
Using sudo setenforce 0 I was able to temporarily switch to permissive mode. I also recently discover that I could make the permissive mode permanent using
sudo update-bootloader --config
I am wondering if there is a way to permanently allow ssh remote access and graphical login without necessarily switch to permissive mode.
Thansk for pointing me to the SLES 16.0 doc. I just noticed that the doc is not correct. At least in Leap 16 and above, modifying /etc/selinux/config has no effect. The only way to permanently change the mode is by using the update--bootloader command (see Selinux ignores SELINUX=permissive in config - #4 by mikey_frogplod).
And, BTW, I noticed that I had some typos in my previous post. I was wondering if there is a way to edit posts in the openSUSE forum.
Despite following the steps in the doc to move to enforcing mode, password-based ssh and graphical login does not work.
My previous question was not properly formulated. Let me try again.
Is there a way to allow password based ssh access when running in enforcing mode?
The short answer is yes. Following is an access to a default Leap 16.0 KDE install where I don’t remember tweaking anything else than enabling the sshd daemon:
bruno@terra:~> ssh beta_bruno@10.249.165.84
The authenticity of host '10.249.165.84 (10.249.165.84)' can't be established.
ED25519 key fingerprint is: SHA256:pl9mh00aV97oZ5Cx0dvZWhdLNytqHjK3fojaZwsdf5w
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.249.165.84' (ED25519) to the list of known hosts.
(beta_bruno@10.249.165.84) Password:
Have a lot of fun...
beta_bruno@lt-b:~> sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 33
beta_bruno@lt-b:~>
Posting the errors you get in enforcing mode might help.
Re-reading your OP, ssh access is one thing (shown above) while graphical login is entirely a different beast and might depend on what desktop environment you use on the remote system and whether it uses X11 or Wayland, so please be specific if that is the real question.
My graphical login attempts are local on the machine itself. Since the upgrade, I have to switch to permissive mode to log-in remotely using ThinLinc (I am using XFCE on X11).
So that system was upgraded from 15.6 or older?
Maybe you have still some stale config, possibly /etc/ssh/sshd_config or in the sshd_config.d directory, apparently password login is disabled?
The default config should be in /usr/etc/ssh/sshd_config as a comparison.
Just to make sure, you are trying to login as normal user? Because root login is disabled by default in /usr/etc/ssh/sshd_config:
#PermitRootLogin prohibit-password
...
#PubkeyAuthentication yes
...
# To disable tunneled clear text passwords, change to "no" here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
For local graphical login maybe a bug report is needed, but I have no experience with xfce (and little experience with SeLinux for that matter…).
For remote login via xrdp and ThinLinc, my guess is that ThinLinc is not a native openSUSE package and so might not be covered by the openSUSE SeLinux policies.
So in my view you have three different problems and unless somebody with specific experience chimes in you may be better off starting three different threads with clear and detailed titles to attract pertinent advisors.