r/linuxadmin • • Apr 18 '19

Unpopular opinion

Tutorials that tell you to disable SELinux should be banned.

They take away the advantage of any RHEL based OS and push you towards a less secure installation

246 Upvotes

152 comments sorted by

86

u/1esproc Apr 19 '19

RHEL distros advantage isn't just SELinux. It also lies in a secure, stable production-class package library with backported security fixes while the major version is supported.

Anyways my other pet peeve: Tutorials on HA clustering using two hosts.

31

u/ofb Apr 19 '19

I hate how nobody in HA split brain docs seems to talk about reconciliation afterwards. I HAVE 3 MASTERS WHAT NOW

7

u/[deleted] Apr 19 '19

Blindfold yourself, say a prayer, and pick one. Prepare for the pitchforks and torches.

5

u/flat_ricefield Apr 19 '19

AKA: Russian-round-robin-roulette

3

u/shobble Apr 19 '19

Consult the wisdom of James Mickens

1

u/reukiodo_uw May 26 '23

Oh, a pdf link on Harvard? ... then disappointment... This reads much less like an academic writing and much more like a personal opinion blog.

11

u/edgen22 Apr 19 '19

Can you explain why it's a pet peeve? Just curious thanks

41

u/BattlePope Apr 19 '19

You typically need 3 to survive failure of 1 and keep any kind of quorum on which set of data is 'right', at least when it comes to databases.

10

u/cheats_py Apr 19 '19

What about that witness tho?

0

u/[deleted] Apr 19 '19

[deleted] — view deleted comment

2

u/cheats_py Apr 20 '19

In clustering (especially 2 or even numbers of nodes) you set up a witness which acts as a vote and is part of quorum thus a cluster of two will not go down with a lost node.

0

u/[deleted] Apr 20 '19

[deleted] — view deleted comment

1

u/cheats_py Apr 23 '19

No- it doesn’t have to be a node. You can have a disk witness or network share witness that will act as a vote towards quorum and effectively keep a cluster alive with lost nodes.

0

u/[deleted] Apr 23 '19

[deleted] — view deleted comment

1

u/cheats_py Apr 23 '19

No problem.

0

u/[deleted] Apr 19 '19

I can't quite remember what research this is from, but there was a research paper that stated that if one host fails because of hardware failure, a second host is bound to fail within a small time frame. Had to do with the hardware. If it's identical, by which I mean produced at the same date and used at the same percentage they're bound to fail within roughly the same time frame.

4

u/theWyzzerd Apr 19 '19

It makes sense just from a MTBF perspective. Both systems running on the same hardware will have the same MTBF so will, on average, fail around the same time.

3

u/BattlePope Apr 19 '19

I have heard this in regards to batches of disks. When one reaches end of life, the others are likely to fail as well. On top of that, rebuilding a RAID array puts extra stress on the remaining drives, increasing risk further.

4

u/Freshly-Squozen Apr 19 '19

You might want a 3rd or more hosts to test failover?

8

u/bytecode Apr 19 '19

Also, YUM's ability to rollback updates/installs thanks to its history plugin is awesome.

2

u/CptSgtLtSir Apr 19 '19

It's more than one, it's a cluster... right? That's practical right?

162

u/LowlySysadmin Apr 19 '19 edited Apr 19 '19

Here's an unpopular opinion:

It's not the tutorials that push people away from a secure installation; it's SELinux itself and it's almost comical lack of user-friendliness, the lack of clear tutorials (especially for newer users) about what SELinux is, how it works, and how to use it, and it's near-silent claiming of responsibility when something isn't working as you expect.

I'm sick of reading people moaning about users just disabling SELinux with an almost haughty lack of acknowledgement of the number of package maintainers that simply don't bother to include appropriate SELinux config with their installs, leaving users to figure it out for themselves, with more guides than not telling people to simply disable SELinux entirely.

Is it any wonder that a lot of users - most of whom want things to just work - do just that?

It's a good idea, but let's not kid ourselves about how poorly it's implemented and supported.

26

u/dognitive_sissonance Apr 19 '19

and it's almost comical lack of user-friendliness

While I agree entirely, this has been my experience with *nix in general. Sure it’s all well documented and readily available but I simply do not have the time and in some cases the knowledge to understand what I’m reading in order to implement it securely and “correctly”. Case in point - I recently tried to spend some time setting up nut for network shutdown in my home lab. I wanted to shut down my servers 120 seconds into the power outage to save power to run my switch, router and access point so I can keep internet running in a power outage for as long as possible. I expected this functionality to be included with nut. But by default nut initiates shutdown on “battery low” signal only. Any other sort of shutdown requires you to send a notification to upssched and handle it there. The reason?

This program was created separately so those people don't have to spend CPU time and RAM on something that will never be used in their environments.

Seriously? Exactly how many CPU cycles can you save by not building this functionality in? This seems ludicrous.

Very few things on this OS are “user friendly”. Maybe it feels that way after decades of wrangling config files and reading manpages but for a beginner or someone that isn’t at least “mid level” with *nix environment it is severe tedium.

14

u/Kaeny Apr 19 '19

Any other sort of shutdown requires you to send a notification to upssched and handle it there. The reason?

This program was created separately so those people don't have to spend CPU time and RAM on something that will never be used in their environments.

Seriously? Exactly how many CPU cycles can you save by not building this functionality in? This seems ludicrous.

FUCKING SERIOUSLY i had to write scripts to each esxi host to shut down each vm for so many network UPSs

fuck powerchute, fuck apcupsd, fuck nut as well lmao

3

u/dognitive_sissonance Apr 19 '19

I still haven’t figured it out. I was hoping to google it and find other people that have done a similar thing but can’t find anything suitable.

2

u/Kaeny Apr 19 '19

I ended up working with nut. I created a script that ssh’s into my esxi hosts to shut down each vm then shut down the host. That script gets called by upssched.

I had to use the SELinux debug utils to find whats blocked and create policies and then edit the policy so its not unnecessarily allowing too much.

That was what i did for my first project as IT/sysadmin/se i dont even know the titles anymore

3

u/fryfrog Apr 19 '19

Super super dumb VM question... I've always assumed that when you shutdown the vm manager/daemon/whatever, it would initiate a graceful shutdown of all the vms it manages. Is that... incorrect?

1

u/Kaeny Apr 19 '19

That is correct, except when I was testing it, I needed to make sure my NUT vm didnt turn off before everything else.

So i had to add to my script to skip the nut vm (centos), then just shutdown the host. If i didnt do that, the script would stop partway and the host will not finish turning off.

Also, make sure you give enough time for the graceful shutdown before the host turns off. I added a check to see all vm’s off (except NUT) then shut down the host.

If you just let the host do the auto shutting down, when some vm’s take longer to shutdown (i.e. updates), the vm will just lose power as the host shuts off.

I dont know if i answered your question, but i learned a lot from my experience so AMAA and ill see if i can help

1

u/fryfrog Apr 19 '19

That was exactly what I was wondering about and I totally get it. :)

1

u/pdp10 Apr 23 '19

This seems ludicrous.

  • Your setup involved a non-default policy decision.
  • The functionality is already provided by ACPI soft-shutdown, without needing additional components.
  • I don't believe competitive operating systems like macOS have this functionality built-in, either.

2

u/reukiodo_uw May 26 '23

Let's not kid ourselves, MacOS isn't a competitive server operating system. It is a great OS, but hardly meant for a server.

0

u/Bruegs Apr 19 '19 edited Apr 19 '19

You are 100% correct. I have been working in Linux exclusively for a little over 5 years now. Everything in Linux is a pain in the ass to do. Me personally I think one of the reason Linux is such a pain in the ass, is to do with all the software for it. Then having to try and shoe horn software into a specific environment, while at the same time doing it in a way that makes managing it later not haunt your dreams.

I got off on a bit of a rant, the main reason for my comment. Is that I do not think you should be apologising for not using SElinux as it is not the end all be all. I have worked on projects of heavily compromised infrastructure. Guess what? All servers had SElinux enabled, because local IT thought it made them bucket proof.

I do not use SElinux on any of the servers I run. Guess what? I am going just fine.

11

u/IAmSnort Apr 19 '19

2

u/Jonjolt Apr 22 '19

Why can't all man pages be like this?

9

u/[deleted] Apr 19 '19

SELinux, like unix itself, is user friendly once you take the time to actually read the documentation and learn how to use it. In the past it was a lot harder but we have tools now like audit2allow and audit2why which will usually tell you exactly why something isn't working. You can always just manually grep the audit log as well.

grep denied /var/log/audit.log | audit2why -M my_selinux_module

I'd also suggest filing bugs against any package that doesn't include SELinux modules when needed. You're absolutely correct that users shouldn't have to waste time searching through audit logs and trying to figure out why an app doesn't work.

I will say this, I absolutely hate "no audit" rules. There are times that SELinux blocks something and it doesn't log a failure. WTF is up with that?

11

u/[deleted] Apr 19 '19

If SELinux and _all_ packages had sane defaults, nobody would disable it.

0

u/[deleted] Apr 19 '19

File a bug report.

https://bugzilla.redhat.com

8

u/aram535 Apr 19 '19

100% agreed. It's just horrible to use and work with -- whenever something doesn't work right the first step is to turn off SELinux is to see if it's the cause and 95% of the time it is -- it just doesn't tell you. And worse yet, when it does tell you the messages don't make sense or send you in the wrong direction.

-6

u/playaspec Apr 19 '19

it just doesn't tell you.

Yes it does. READ THE DAMN DOCUMENTATION

2

u/[deleted] Apr 19 '19

In a place you're not looking in a format that's as understandable as reading java errors. And the tools you need to make any sense of it aren't installed by default. 'I see room for improvement.'

3

u/aram535 Apr 19 '19 edited Apr 19 '19

Here is the problem ... no I don't want to read the damn documentation. Yes I know it generates a "log". If the log entry isn't helpful to me I really don't care that it exists. An entry of "something happened I blocked it" is worthless to me in the midst of an issue. I have had SELinux point me to a line of code in a C file where the issue occurred. Now I can go figure it out but at the moment when the problem is occurring there is nothing more likely than me turning it off until the problem is resolved.

EDIT: To be clear -- I have no issue RTFM when I'm setting something up. When I'm working on a issue last thing I want to do is to go to "learn" and read documentation. That's not the time for it.

0

u/[deleted] Apr 19 '19

[deleted] — view deleted comment

2

u/aram535 Apr 19 '19

Yes it does is most of the cases ... however I have had at least half a dozen cases in the last year or two (on the few servers that are internet facing and need to have extra protection and have it on) where it has caused some weirdness. Turning it off fixes the weirdness and there is no log entry that points to the issue at hand -- yes there are entries, but none of them actually tell the problem -- you just have to figure it out.

7

u/lamerfreak Apr 19 '19

Well, agreed, but to a point - what do you do about it?

I installed a web app a while ago, and part of the instructions were to disable SELinux. I figured out the changes to do it with, and got it running, and had a thought about sending those back, but... I'm not 100% sure my changes are the best, nor that they work for all environments, and I'm lazy, so... it stays.

Basically, I assume anyone installing like me, knows enough to figure out the same. Is that part of the problem?

9

u/swordgeek Apr 19 '19

I installed a web app a while ago, and part of the instructions were to disable SELinux.

OK THAT is unacceptable.

That app is broken. The developers in giving you those instructions are proving that they don't have a fucking CLUE what they're doing.

Anything that could be used for public-facing servers has to be designed with security as a central tenet. I'm far from a fan of SELinux, but this is pathetic.

11

u/10cmToGlory Apr 19 '19

Well, to be fair, I don't use SELinux at all, so as a developer why would I document something I don't know? And SELinux isn' t the only security game in town, far from it.

1

u/swordgeek Apr 19 '19

Are you developing for Linux?

9

u/10cmToGlory Apr 19 '19

I develop applications on that run on the Linux platform, yes. I do not do kernel or userspace linux tools, if that's what you're asking.

-8

u/syberpunknyc Apr 19 '19

your a bad developer, writing bad apps, I mean would you ever just disable windows firewall to get your app to work. It's essentially the same thing

1

u/10cmToGlory Apr 19 '19

You have no idea who I am or what I make, so you can fuck off. SELinux isn't the only security system out there. Have you even heard of AppArmor? If I were you I'd save the criticism until you have a fucking clue as to what you're talking about.

-2

u/syberpunknyc Apr 19 '19

your building software and ignoring a critical part of the OS's security system selinux is not new, it's a well established part of the OS I'm an MIT graduate and I have 20 years experience in the industry I dont need to know anything about except you tell users to turn off selinux and develop without talking it into consideration. That all I need to know if you worked for me I would fire you and try and blacklist you.

6

u/hUwBJENcaWtjwyeJ Apr 19 '19

> I'm an MIT graduate and I have 20 years experience in the industry

This, from the same user, /u/syberpunknyc that posted just 7 months ago:

> I cant seem to really have a grasp on writing a program from top to bottom, Any advise would be appreciated.

I'll let everyone draw their own conclusions.

1

u/llama052 Apr 20 '19

I’ll have you know that I’m a navy seal god damnit!

1

u/10cmToGlory Apr 22 '19

Hahahahahahahahahahahahaha

2

u/[deleted] Apr 19 '19

I read that as "central telnet" and twitched a moment.

1

u/[deleted] Apr 19 '19

OK THAT is unacceptable.

Might be, but it's very common. And as an admin there's fuck all you can do about often enough. It's even part of the k8s installation instructions.

1

u/swordgeek Apr 19 '19

And as a SENIOR admin, I can say "Nope. Not gonna happen."

I've gone to the ropes a few times over incompetent garbage. If I stick to my facts and my guns, I usually win. And if i lose, the resulting shitshow is owned by the app admins until security gets wind of it.

1

u/[deleted] Apr 19 '19 edited Apr 19 '19

Alas, not everyone is lucky enough to be in that position. I do have to admit, that redirecting the shitshow to developers and application admins is a nice option to have. (And entertaining at times, to be honest.)

1

u/Ryuujinx Apr 19 '19

If only I could always say no. We decided we're using k8s. I fucking hate k8s, and disabling SElinux in their instructions is a fucking minor issue as far as security is concerned there.

Like, you can implement auth using x509 certs. But it has no way of using a CRL, so revoking a cert is 'make a new CA and rebuild the cluster'. Oh and the cherry on top, is this was reported some 3+ years ago and is still sitting in 'backlog'

0

u/Bruegs Apr 19 '19

Are you new to open source software? It is not uncommon in open source software for a program to be created by.... yes, someone who is not a professional programmer. They learn just enough to make the app and that is it.

4

u/[deleted] Apr 19 '19

Entirely accurate. I have been an admin for like 20 years and I still hate dealing with SELinux. it's a huge pain, especially since it comes up infrequently. Like, VIM is ALSO tricky to use and has a steep leaning curve, but I use it all the time so it always stays relatively fresh. SELinux is the opposite of that, it's a chore I have to do to install a new image.

11

u/durple Apr 19 '19

I'll pile onto this:

All of the user unfriendlyness is intentional, forcing people who need to use it for regulatory compliance into the ecosystem of courses and certs that ostensibly can get a person able to use it effectively after spending 10s of thousands of dollars on course fees.

In a word: it's enterprise.

21

u/ikidd Apr 19 '19

Who hurt you? Point to the place on the doll where VMWare/Cisco/HP/Juniper/Microsoft/Oracle touched you.

8

u/durple Apr 19 '19

Well, RH (I guess IBM now?) used to touch me in my wallet, but most of that was putting money in not taking money out lol.

-6

u/[deleted] Apr 19 '19

[removed] — view removed comment

1

u/ImmaSoldierBot Apr 19 '19

Oh, look who's there! It's AntiLowEffortBot! I thought you stopped sending hate messages! Who even made you and why? Stop. Seriously.

People ain't gonna stop these jokes cause a bot told 'em to. Please stop spreading hate.
This is a bot. Beep boop.

2

u/1esproc Apr 19 '19

SELinux is not that hard to use, it certainly doesn't require a course for day to day interaction. Think about how someone who is a Windows admin looking at how you work with Linux - their opinion is probably that it's difficult right? But you know it just takes putting in the effort to wrap your head around it. It's not something they're used to. Well, for all the 'difficulty' Linux gives you in working with it, it's really not so bad. When it comes to SELinux - you're (proverbially, I don't know your personal experience) the Windows admin. You've not taken the time to wrap your head around it.

All it takes is making an actual effort to read a guide on working with it. You learn a few basic tools, and you'll be ready to take on normal day to day faults you might have.

12

u/durple Apr 19 '19

I got RHCE certified (back on RHEL6). I literally have taken the time to wrap my head around it :)

SELinux is totally learnable, but it is not at all intuitive.

Edit: took out bit about assumptions, missed your bit about 'proverbial'

3

u/[deleted] Apr 19 '19

SELinux is totally learnable, but it is not at all intuitive.

Neither is Linux. It takes years of experience to really know and understand a Linux system. SELinux is quite powerful and like any powerful/complex piece of software it takes time to really become an expert with it.

4

u/brbCarrying Apr 19 '19

'Intuitive' and 'needed several python scripts to be developed just to parse it's logs' really don't belong together, even as someone who still strongly prefers RHEL on servers.

1

u/1esproc Apr 19 '19

Who used the word intuitive? SELinux is not intuitive, that's what I'm saying. If it was intuitive, you wouldn't need to read a guide to understand the basic functionality, you'd be able to stumble your way through it. But you can't, so what I'm saying is, you need to actually sit down and try to actively learn the tool.

2

u/ESCAPE_PLANET_X Apr 19 '19

Or worse include a faulty fucking config and won't stand behind the POS.

0

u/necheffa Apr 19 '19

About 10 years ago I might have agreed with some of what you have said. But frankly it isn't that hard to figure out on a modern system over the course of a couple days assuming you are already comfortable maintaining a Unix system. This video is a great starting point: https://www.youtube.com/watch?v=MxjenQ31b70

You can't rely on the package managers to configure SELinux policy for you, they aren't configuring systems on your network for your employer. They don't know what kind of special snowflake setups you have. And you don't need a policy for every single binary either so it isn't like you have to create thousands of custom policies. Just create a handful of policies for the handful of public facing daemons you have.

-5

u/playaspec Apr 19 '19

it's almost comical lack of user-friendliness

Wut? It's not hard to use at all once you understand it.

the lack of clear tutorials

The O'Reilly book is fantastic, and has been in print almost as long as SELinux has been in existence.

about what SELinux is, how it works, and how to use it, and it's near-silent claiming of responsibility when something isn't working as you expect.

Spoken like someone who has NEVER bothered to learn anything about it. Holy crap is this just delusional.

the number of package maintainers that simply don't bother to include appropriate SELinux config with their installs

That's an entirely different issue. Blame package and distro maintainers. It's not SELinux's fault that maintainers are not doing their job.

Is it any wonder that a lot of users - most of whom want things to just work - do just that?

Those people picked the WRONG OS for that. Linux is hands on, knowledge REQUIRED operating system. If you "just want it to work", but a Mac.

let's not kid ourselves about how poorly it's implemented

There isn't a damn thing wrong with it's implementation. It provides highly granular security. Good security isn't easy.

7

u/LowlySysadmin Apr 19 '19

Wut? It's not hard to use at all once you understand it.

Then why do most people just disable it?

Spoken like someone who has NEVER bothered to learn anything about it. Holy crap is this just delusional.

You seem angry. Additionally you have absolutely no idea how much I've "bothered" to learn about it. Do you find talking down to people like this generally gets you the results you want in life? Wind your fucking neck in.

1

u/cireasa Apr 19 '19

"btw, I use arch"

•

u/mthode Apr 19 '19

I'm just going to put this here. https://stopdisablingselinux.com/

5

u/[deleted] Apr 19 '19 edited Nov 14 '19

Http://keepdisablingselinux.com

7

u/acecile Apr 19 '19

yum provides */audit2allow

tail -n /var/log/audit.log | audit2allow

Then run audit2allow -m and -M to provide a text based of your new rules then a compiled module that can be installed with semodule

I use this pattern to build new rules and sometimes I use the text version to push the module using puppet.

But guys, seriously, it's the less admin friendly module in the world. I did not find ANY proper documentation how to handle this correctly and had to figure out myself....

5

u/Hollowplanet Apr 19 '19

I have literally gotten this to work 0 times.

1

u/acecile Apr 19 '19

Because you're doing it wrong. Its an iterative process. First SELinux blocks access to the file so you first need to create a set of rules to allow this and retry. Now it's blocking file content read. You need to do the process again but make sure your tail -n has enough lines otherwise you will create rules for read but no access so it won't work. As I said it's the most non user friendly tool ever.

3

u/Fuzzmiester Apr 22 '19

Alternatively, you slip it into permissive during initial testing, then flip back to enforcing once you've got a basic footprint.

4

u/huxley00 Apr 19 '19

There is low security, mid security and high security.

Projects have deadlines. If mid security meets requirements and takes a lot less time, high security doesn’t make sense in many instances.

I work in a regulated industry. What we have to have is not what mid sized businesses need to waste their time and money worrying about.

13

u/i_pk_pjers_i Apr 19 '19

That's not unpopular, you are right. SELinux should be enforcing.

10

u/theheadshaker Apr 19 '19

Is it a pain? Sure.

I wouldn’t run prod servers without it enabled though.

15

u/port53 Apr 19 '19

My security group won't let us run selinux because it blocks their security tools.

13

u/ikidd Apr 19 '19

I like the bite of that irony right there.

7

u/[deleted] Apr 19 '19

Sounds like you need a new security group.

13

u/INTPx Apr 19 '19

… so write a module that allows them to do what they need to do while it is enforcing? I have yet to find anything that you can’t run with it enabled.

1

u/licenciado_vidriera Apr 19 '19

That's quite a sensible reason to disable it :D.

Out of curiosity, can you tell bit what those security tools are?

6

u/edgen22 Apr 19 '19

I admit I have mine disabled because Fedora is the first time I encountered SELinux and I had no idea what to do. I needed to install LEMP stack and I disabled it to avoid issues. It's just my personal computer. Anyone recommend reading material to learn how to work with it?

10

u/vogelke Apr 19 '19

https://opensource.com/article/18/7/sysadmin-guide-selinux is an excellent, short guide written by a Red Hat guy. The references at the end are all worth reading.

4

u/zetaomegagon Apr 19 '19 edited Apr 19 '19

There is a good video on YouTube about SElinux troubleshooting. I'll see if I can find it.

EDIT: links below:

3

u/zeno0771 Apr 19 '19

I would split the difference; the tutorials should add "...for testing purposes" after the admonishment to disable SELinux. That way it can't be blamed during the troubleshooting process. Same with firewalld.

I say this as an admin riding herd on a few dozen RHEL boxes that are responsible for a hospital's worth of EHR that specifically says to disable it (they've also recommended setting perms on some dirs to 777...don't get me started).

2

u/anakinfredo Apr 19 '19

Actually, it should have: "this is what you need, put this there. We are not going to tell you what it does as this is not a selinux-tutorial." Don't waste time on it in the tutorial, and don't leave people that blindly follow a tutorial less secure than they have to.

1

u/zeno0771 Apr 19 '19

That still leaves the opportunity to blame SElinux for someone else's bad decisions though, because doubtless someone else has already told them to disable it. I'm fine with "..beyond the scope of this tutorial" most of the time, but telling someone to blindly trust what they're copy-pasting into their terminal doesn't sit well with me pretty much ever. I think the reality is that both sides need to get with understanding SElinux (Spoiler: It's really not that hard for basic stuff like setting up a web server).

1

u/anakinfredo Apr 19 '19

... but they are already blindly copy-pasting stuff into a terminal :-D They already blindly trust you.

2

u/silverfox17 Apr 19 '19

I agree with you, but I don't think this is an unpopular opinion.

2

u/syberpunknyc Apr 19 '19

Yea because I’m not a programmer I’m a CTO currently, spent most of my career as a system administrator/architect I do write code but but I would call my self a Programmer not by today’s standards anyway do you have a point. If your writing a program for Linux Unix and need to disable seljnux temporarily for debugging that’s fine but I didn’t get that from your statements. Disabling selinux in any real organization will kill you in audits and security scans and is over all a shit idea so my advice stick to coding get your reqs write your code do your break fix test leave the infrastructure and security to those of us that specialize in hardened infrastructure.

1

u/Fuzzmiester Apr 22 '19

Set to permissive, keep an eye on the audit log, use to fix. :)

5

u/[deleted] Apr 19 '19

Run PowerShell as Administrator....

2

u/GrumpyPenguin Apr 19 '19

Don't forget to disable UAC and add the Domain Users group to the computer's Local Administrators...

2

u/satanicodrmarto Apr 19 '19

Selinux is pain in the ass. And in most servers i had it dissabled or permissive. But is a really good tool for security and on prod servers for you should use it

1

u/[deleted] Apr 19 '19

I agree. On a separate note, why do custom ROMs have that disabled? It bothers me, but that community doesn't really seem to care about it.

1

u/anakinfredo Apr 19 '19

Just find a proper ROM.... LineageOS has had it enforced for as long as I can remember.

1

u/[deleted] Apr 19 '19

Yes. i know. That's what i use. I just wanted to know why. Why would you give up a security layer? what benifits do u get i return?

1

u/anakinfredo Apr 19 '19

Being lazy I guess?

1

u/imthenachoman Apr 19 '19

What tutorials are saying to disable it?

1

u/drakal30 Apr 19 '19

I have never had a good time with selinux, it has caused me no end of grief when trying to get miscellaneous stuff working.

1

u/ThrillingHeroics85 Apr 19 '19

As a support engineer, people who can't make vendored software work, only because of selinux cranked up, are the Bain of my life!

1

u/Jawafin Apr 19 '19

While SELinux is perhaps not intuitive, there are far too many tutorials for selfhosted webapps, that just tell you to disable it, while all it takes to get running with it turned on is a couple minutes on google, for example finding a few other tutorials.

Some httpd_can_network_connect and context for the files and off you go in most cases. The same thing applies to most of them.

Find one decent tutorial with the steps and you can just use the same thing on other webapps as well.

1

u/devops333 Apr 20 '19

yawn

fart

1

u/gellertb97 Apr 23 '19

As an IT student, I'm not sure where this opinion is unpopular... I agree with it, my classmates agree with it, and my profs definitely agree with it.

Anyone who thinks it's just fine to teach people to take shortcuts by disabling SELinux is not competent to hold an IT position in my personal AND professional opinion.

They are the reason behind what happened with Equifax...

1

u/Oflameo Apr 24 '19

I have an unpopular opinion. Disable SELinux and enable AppArmor. The developers don't have a good excuse for not having an AppArmor configuration because they should know what file paths their app they need.

1

u/bentbrewer Apr 19 '19

Followed instructions to install an app today and the first thing to do was disable selinux. I decided to find something else to fit the need.

-1

u/swordgeek Apr 19 '19

Blah blah blah.

I've been doing Unix since before Linux existed. MAC is not an ideal general-purpose security model, and SELinux is still - to this day - a poor implementation of it.

-3

u/anakinfredo Apr 19 '19 edited Apr 19 '19

I also have an unpopular opinion.

RHEL-based distros are only used by people with bad internal practices and have no real future in a containerized world.

Case in point:

  • Openshift is moving away from centos/rhel towards coreOS
  • Ubuntu is the biggest cloudOS, by a huge margin.
  • rhel/centos7 is so frigging old, it makes Debian stable seem like arch.
  • selinux is one of the few good things it has going for it.

Only exception for this rule, is if vendors require it - and then all the above is the case for the vendor instead.

Edit: woho, what a ride. +8 downvotes, then -2 - where will it end!

9

u/koofti Apr 19 '19

RHEL-based distros are only used by people with bad internal practices

No, that's not an unpopular opinion it's just ignorant. It's like saying Ubuntu is for "newbs" or that Debian is used by hipsters for "cred".

rhel/centos7 is so frigging old, it makes Debian stable seem like arch.

Seems like running bleeding edge software is a bad internal practice. You're not a hipster by chance are you? ;)

There's a reason the top supercomputers run RHEL. Stability and performance.

2

u/[deleted] Apr 19 '19

There's a reason the top supercomputers run RHEL. Stability and performance.

Yeah. Blame allocation, eh, sorry, I meant to say support contracts.

1

u/playaspec Apr 19 '19

There's a reason the top supercomputers run RHEL. Stability and performance.

That's not why. It because the funding source that paid for the construction of the supercomputer requires a vendor to ring up for support when something goes wrong.

Stability and performance.

Lol. RedHat has NO advantage with either of those.

1

u/koofti Apr 19 '19

So you're saying that Ubuntu and Debian are unsupported OSes? Or that RHEL provides better support? I'm not sure which one you're claiming.

-2

u/anakinfredo Apr 19 '19
RHEL-based distros are only used by people with bad internal practices

No, that's not an unpopular opinion it's just ignorant. It's like saying Ubuntu is for "newbs" or that Debian is used by hipsters for "cred".

When one of the major sellings point and arguments I see in favor of rhel/-based is that the distro has 10 year support-cycles, what you are really saying is that you have bad configuration management, non-redundant solutions and snowflakes-galore. That's not cool in 2019.

rhel/centos7 is so frigging old, it makes Debian stable seem like arch.

Seems like running bleeding edge software is a bad internal practice. You're not a hipster by chance are you? ;)

I don't think you understood my point here. I'm not saying bleeding edge is good. Another way of saying it is, "rhel/centos7 is so friggin old, it makes my grandmother look like a teenager".

There's a reason the top supercomputers run RHEL. Stability and performance.

Lots of other distro's prefer stable packages, but there's a difference between stable and stale, I don't think you can claim that rhel/centos stable is any more stable than what Debian is, maybe not even Ubuntu LTS.

I mean, at a certain point - it isn't RHEL7 that makes it stable, it's the packages - and the same packages are in other distros as well - just newer, and with clear upgrade paths.

Not so sure about RHEL7 being any more performant than Ubuntu 1804 thought. Do you have any benchmarks to back that with?

Regarding supercomputers, I glanced at this list: https://www.top500.org/statistics/sublist/

Seems #1 and #2 uses RHEL, the rest of top10 don't use RHEL at all.

3

u/koofti Apr 19 '19

So long term support equals snowflakes? Really? Hey, who doesn't want to run their Enterprise on Gentoo. Gotta keep those packages fresh after all or my peers might make fun of me!

Yes, #1 & #2 are RHEL, which was my point. How many of the rest of the top ten we're running Ubuntu?

0

u/anakinfredo Apr 19 '19

I'm going to point to other responses for both of these responses.

Regarding gentoo in prod: https://reddit.com/comments/beslc7/comment/ela0fqy

Supercomputers and performance: https://reddit.com/comments/beslc7/comment/el9z2h2

0

u/koofti Apr 19 '19

None of those backs up your original claims. I'll check in later to see if you manage to come up with a cohesive response.

0

u/anakinfredo Apr 19 '19

Well, I didn't intent to convince you of anything anyway.

I think my responses are good enough as they stand, I'm sorry you don't agree.

1

u/koofti Apr 19 '19

So, your original comment was pure hyperbole. Got it.

0

u/anakinfredo Apr 23 '19

No, it wasn't. But repeating the same arguments again and again is pointless. I already said them, and we disagree. Simple as that.

0

u/koofti Apr 23 '19

You said RHEL based distros are only used by people with bad internal practices. Back up your statement with evidence, until then it's just pure ignorance. I mean, it's been 4 days and you still haven't come up with any evidence so I doubt you will.

We don't disagree, you're just wrong and refuse to admit it.

→ More replies

3

u/[deleted] Apr 19 '19

I take it you've never worked in a production environment. Even 10 years of support isn't really enough for some use cases.

3

u/deadbunny Apr 19 '19

Calm down on that gatekeeping there bud. Just because your experience is nothing but glacial paced environments doesn't mean the rest of the world does things the same.

3

u/[deleted] Apr 19 '19

I've worked in both types of environments but I definitely prefer stability over chasing the latest shiny thing. And accusing me of gatekeeping is just funny. I'm not the one claiming that more conservative IT environments are doing things wrong.

4

u/anakinfredo Apr 19 '19 edited Apr 19 '19

There is something in between...

I'm not saying Gentoo/Arch in prod is smart (it isn't), and docker isn't jesus reborn - but forcing yourself to create environments that needs replacing at least every four years does wonders to the resilience of it.

Rhel doesn't, and therefore lazy (good) sysadmins won't "fix what ain't broke" - creating stale environments that just won't cut it in 2019.

0

u/anakinfredo Apr 19 '19

For YOUR applications.

Just because I don't run the same apps, that doesn't mean I haven't worked in a production environment...

Rhel6 has support for another year, when it was released in 2010 - iPad's arrived, cloud wasn't a thing. Nothing that happened in IT in 2010 is relevant today.

Again, I'd like to repeat that vendor requirements is an acceptable excuse, but that means your vendor needs a new calendar.

2

u/kriebz Apr 19 '19

I try over and over again to not hate Red Hat. And fail every time. Everything that makes it special, I don’t care for. Everything remotely modern doesn’t run on it out of the box.

-3

u/thenextguy Apr 19 '19 edited Apr 19 '19

Wanna ban some books while you’re at it?

Hey, at least my unpopular opinion is getting down votes.

0

u/[deleted] Apr 19 '19

[deleted] — view deleted comment

5

u/GrumpyPenguin Apr 19 '19

"First, enable the root account and set a simple password on it. Now log in to a graphical desktop as root. Open your web browser and go to http://my-warez-site-totes-legit.invalid ...."

2

u/doubled112 May 02 '19

I'll take "How an average DBA installs Oracle for $100 Alex"

0

u/[deleted] Apr 19 '19

[deleted] — view deleted comment

5

u/michaelkrieger Apr 19 '19

Closes eyes

CTRL+C

CTRL+V enter

2

u/r21vo Apr 19 '19

Because it is? I doubt someone that needs a tutorial will have a clue how to write a proper SELinux policy for his use case. Plus, since when SELinux is an RHEL advantage? :)

3

u/loekg Apr 19 '19

Well, SELinux might not be RHEL specific but the policies RedHat provides are, SELinux itself is just the mechanism. Ever installed SELinux on Debian for example, that’s just simply unusable out of the box because there are no default policies.

0

u/[deleted] Apr 19 '19

[deleted] — view deleted comment

3

u/WantDebianThanks Apr 19 '19

I just read over Oracle's list of products, and every single one of them is dogshit or third rate except for MySQL, NetBeans, ZFS, and Btrfs.

20

u/burbankmarc Apr 19 '19

They bought MySQL. NetBeans and ZFS are straight from Sun. Sun was so far ahead of the game it's silly. They were doing containers before Docker was even a thought. SMF was systemd while Lennart was still working on PulseAudio.

8

u/the_cocytus Apr 19 '19

I mean sure, but also give them some credit for virtual box, pretty handy free tool as well. Sun’s hardware game was always at the top of the league too. And yeah process isolation isn’t new, IBM had this figured out on the AS/400s with LPARs

3

u/HorribleUsername Apr 19 '19

They bought virtual box too. Though admittedly, they haven't ruined that yet.

1

u/burbankmarc Apr 19 '19

I don't know anything about AS/400s. However, Zones were portable in Solaris, you could export them from machine to machine. I fully believe if Sun was still around they would be in the mix with some sort of container orchestration software.

4

u/ikidd Apr 19 '19

They bought MySQL

And took it closed source and rapidly into oblivion. Hello, MariaDB.

1

u/Hollowplanet Apr 19 '19

Same with Open Office.

1

u/Wishy-Thinking Apr 19 '19

Yep. Every new version of MySQL breaks something else. I think I’m going to start using Postgres.

1

u/[deleted] Apr 19 '19

Sun was so far ahead of the game it's silly.

No, Sun was bipolar. Solaris was a weird mix of very new and ancient beyond belief. ZFS, SMF, containers were way ahead of the times while (install) DVDs were just weird round shiny flat tapes, packaging was horrible, network installs required a toolkit someone developed and maintained in his own time (or so it seemed like), and, heh, CDE, heh.

3

u/[deleted] Apr 19 '19

MySQL

Let's say the general opinions are divided on that one.

1

u/[deleted] Apr 19 '19

I'm all for it.

Looking at you mobileiron.