• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

How to run SELinux on Ubuntu

 
Marshal
Posts: 73243
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Earlier this week, I was reading about permissions and security. And I started thinking about SELinux, which Tim Holloway menetioned. I have seen SELinux only on Fedora/RedHat boxes, but I run Ubuntu too, so I was wondering how to install SELinux on Ubuntu. If you search you find out about things like setenforce, but I don't appear to have got off to a good start:-

sudo apt-get install selinux
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Unable to locate package selinux
...
sudo setenforce
[sudo] password for campbell: ABCD1234XYZ
usage:  setenforce [ Enforcing | Permissive | 1 | 0 ]
sudo setenforce Enforcing
setenforce: SELinux is disabled

So I don't even know whether I have got it installed; which selinux returns nothing.
 
Campbell Ritchie
Marshal
Posts: 73243
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It says here you should uninstall AppArmor before using SELinux on Ubuntu.
 
Marshal
Posts: 3592
511
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a bit surprised that it isn't installed by default.  Is that just only for Ubuntu, or all Debian derivatives?

I mainly used Redhat/CentOS and SELinux is installed and running by default - you have to intentionally disable it is you don't want is active.

 
Campbell Ritchie
Marshal
Posts: 73243
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not tried any other Debian derivatives. Yes, it runs “enforcing” by default on all the RH/Fedora boxes I have used. The link in my second post suggests that AppArmor performs an analogous function on Ubuntu/
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic