2

To start I'm a complete noobie in the matter of SElinux and ubuntu, so my problem is that I tried installing it on ubuntu server 18.04 using this tutorial: https://www.linode.com/docs/quick-answers/linux/install-selinux-on-ubuntu/

But I cannot enable it either using setenforce or changing config file in selinux.

root@test:/# setenforce 1
setenforce: SELinux is disabled

If you need more info, I will gladly provide them.

Thank you in advance.

Adrian S
  • 23
  • 1
  • 1
  • 4
  • There is a posting about SELinux at [https://askubuntu.com/questions/481293/selinux-implementation-in-ubuntu](https://askubuntu.com/questions/481293/selinux-implementation-in-ubuntu) which discusses installation – Charles Green Nov 07 '18 at 15:25
  • also worth reading: https://docs.fedoraproject.org/nl-NL/Fedora/11/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Working_with_SELinux-Enabling_and_Disabling_SELinux.html – Rinzwind Nov 07 '18 at 15:46
  • and also see https://askubuntu.com/questions/468821/selinux-is-not-enabled We use apparmor and it will conflict with selinux – Rinzwind Nov 07 '18 at 15:48
  • Thank you for your response @CharlesGreen tried the steps from the link you posted, still selinux is disabled – Adrian S Nov 07 '18 at 16:30
  • @Rinzwind purged apparmor before installing SELinux, i believe i should use CentOS... – Adrian S Nov 07 '18 at 16:33

1 Answers1

3

Just arrived here from a Google search.

Do NOT use SELinux with Ubuntu. It is not tested at all. After enabling SELinux, many package installations fail. In particular, anyone that runs "groupadd" to add a group specific to a service. See https://bugs.launchpad.net/ubuntu/+source/libselinux/+bug/1769301

SELinux is tested and enabled by default with CentOS and Redhat Enterprise Linux. Ubuntu offers AppArmor as alternative security mechanism. If you prefer SELinux, use a distribution that enables it by default, like Redhat or CentOS.

  • Thanks for your response ! I resoled my problem by installing CentOS after researching and finding that Ubuntu and SElinux aren't compatible at all. Marked as ANSWER for other people with this kind of questions or ideas to see your info, Have a great day ! – Adrian S Mar 22 '19 at 08:13