Advanced

UnConfusing The Issue Of Disabling Root On Linux or Unix

Posted by eggi on · 85 comments
The Linux and Unix Menagerie; By Mike Tremell
Mail this story
Print this story

A look at various ways to secure the root account against system users and some in-use methods that seem to cause more harm than good.

Full Story

  Nav
» Read more about: Story Type: Editorial, Tutorial; Groups: Linux, Sun, Ubuntu

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (85)

65 earlier comments in the full thread.

Quoting: No a separate user and root password is not more secure magically. It is more secure technically. 40+ years of Unix, has proven that.
Well, an assertion does not make for a proof. I am not going all over this again rehashing the same things. Even though I am used to people ignoring the previous posts in most other forums, it was not expected that this will drag for so long in this forum. All that was needed to be said from my side has already been said; please see the previous posts. If there something new that you want to add, then it can certainly be discussed.
Quoting:Well, an assertion does not make for a proof.


The assertion you make is utterly unproven. On the other hand the assertion I make is supported by 40 plus years of practice, and Unix/Linux good practice.

BTW it's not that one did not read your previous assertions regardsing sudo, it that one sees no value in them.
Quoting: On the other hand the assertion I make is supported by 40 plus years of practice, and Unix/Linux good practice.
For starters there are multiple flaws in your assertion. First off you provide no tangible evidence for the assertion. Secondly if you claim that traditional setup is more secure technically, then there is no reason to resort to history as evidence. Thirdly, since you claim it is "more secure" there is something that it is more than and that something is certainly not *buntus since the default setup used in *buntus has not been in existence for 40+ years. If you compare the setup in *buntus to Windows or other such systems, then that is flawed as has already been explained earlier and for the period that *buntus have been around there has not been a single exploit which is caused by this particular "weakness".
Don't you think you are getting just a little precious here? You ignore 40 years of secure usage because Ubuntu hasn't been around for 40 years. You claim I've provided no evidence that because I point to history, then you claim that the limited time Ubuntu has been around with no exploits is historical evidence that supports your assertion.

Point of Fact. I have never claimed Ubuntu is like Windows. I have consistently stated that Ubuntu is less secure than a traditional Linux set up. I have further stated that I believe the single user/root password (using sudo) is a marketing ploy aimed at Windows users. No where have I claimed Ubuntu is as insecure as windows.

Ubuntu hasn't been around long enough for us to know just how bad this weakness is. What we can be sure of is that separate password for super user works and works well. what we can be equally sure of is that Ubuntu is somewhat less secure than a traditional Linux system, because of the usage of a tool - sudo - that was designed to allow the system administrator to assign specific but very limited tasks, that require root access, to non administrator users, rather than giving them the root password, as a global tool for system administration. Just how less secure we can't know yet, but given that the entire system is protected by only the non root user's password, and that access to that will give the possessor the key to the kingdom, it is less secure, even if only because typically no one logs in with the root password, on a properly set up Linux system.
Point is that you need to provide precise scenarios and vague historical evidence won't cut it. If you claim that "I am more comfortable with traditional UNIX approach since it has been proven for ..." then I have no issues, but if you claim that "Traditional UNIX setup is more secure technically than that in *buntus" then you need to be prepared to back that statement (with a technical approach, if I may say so).
On Ubuntu (or any other system setup in this manner), create another user via System / Administration / Users and Groups , make sure the "Administer the System" user privilege is not set. Tada, you know have a user that cannot perform admin duties via sudo, log out of your current user and log in to that one for an even more secure OS.
Quoting:Point is that you need to provide precise scenarios and vague historical evidence won't cut it.


But you of course don't have to, yet it's ok for you to use the histroical argument.

Quoting:and for the period that *buntus have been around there has not been a single exploit which is caused by this particular "weakness".


Seems that whenever you feel the need you simply make up a set of rules that requires that everyone else justify their case in ways that you are not required to do, while you can wave your arms in the air and pronounce the Ubuntu method safe and secure. The Ubuntu method is not best practice, it never will be. The keys to the Kingdom are there for the taking, the fact that they have not yet been taken is not evidence that they can't be taken. While 40 years of best practice is known to work.
Quoting: But you of course don't have to, yet it's ok for you to use the histroical argument.
Simply because it is your claim that traditional setup is better, so onus is on you to prove that. Anyway, this has become pointless. If you anything substantial to say, go ahead, else this is closed from my side.

edit: And btw, if you read carefully that was in response to your argument i.e. to show that it did not make sense even if one were to consider it.
One thing I haven't seen mentioned is that sudo allows better auditing than direct root access or setuid/setgid binaries. Here in the US, Sarbanes-Oxley Act (SOX) compliance is very important in the business world.
> ...so onus is on you to prove that.

When a traditional arrangement has demonstrated it superiority for 40 years, it's not its onus to prove anything. It's the onus of those advocating a new system to demonstrate that it's better.
Quoting: When a traditional arrangement has demonstrated it superiority for 40 years, it's not its onus to prove anything. It's the onus of those advocating a new system to demonstrate that it's better.
Well, the discussion started with precisely the claims that *buntus model is broken and inferior, not the other way. If such be the claim then unless the side making the claim point out the flaws, there is no reason for the other side to speculate the basis of the claim. I suggest we drop this pointless line of discussion. OTOH, if there is any demonstrable insecurity in the sudo model as compared to the traditional model, then please do bring them.
Actually the discussion did not target *buntu at the start. A few people who decided to blindly defend what they perceived as a slight against *buntu just kept dragging the discussion back to it.

So far you have yet to disprove in a sudo active system why a breached user account is not also a root level breach. THAT is the topic, not how or why *buntu may or may not do things. I can point to several other sudo active distros with the same issue.
Quoting: Actually the discussion did not target *buntu at the start. A few people who decided to blindly defend what they perceived as a slight against *buntu just kept dragging the discussion back to it.
The label *buntu is being used to refer to the setup being discussed. And no, there was no "blind" defense from my side other than in your preconceived imagination. Its just that you need to pay more attention to what the other side is saying.
Quoting: So far you have yet to disprove in a sudo active system why a breached user account is not also a root level breach.
As has already been mentioned there are two possibilities being discussed and mixed with one another causing the confusion.
Quoting: There are two possibilities being discussed here. One is that user account is compromised without password being actually compromised -- this is the "zero" password case mentioned above. Other is that user password is compromised -- this is the 1 password case (vs 2 passwords as claimed for traditional setups). Point is that in both cases exactly one password is actually required to be known for this kind of root level exploit.
It is not clear which breach you refer to. I assumed it to be the second one. In either case the attacker needs exactly one password (user password on sudo'ed systems vs root password). So, no a breached user account does not necessarily mean a root level breach unless the user password is compromised. If user password breach is being considered then as already pointed out umpteen number of times, an attacker will directly go for the root password on traditional setups if root level access be desired. So your starting point of user password breach on both systems is a flawed one.
Default configuration for most systems is to not allow remote root access, which means you must breach a user account first. As I pointed out at the start, you can get the system to readily identify itself and have it give you all needed information as to which direction you need to proceed next. Odds are better than even, if you find yourself on a sudo active system, you need to proceed no further, as you already have what you want, no further hammering on passwords needed. Versus a traditional Unix, where you would still need to access one more password.
Quoting: Default configuration for most systems is to not allow remote root access, which means you must breach a user account first.
No in most linux distros, the default sshd configuration allows for root logins (Mandriva/Suse/Fedora/slackware). Which system are you talking about?
> ...in most linux distros, the default sshd configuration allows for root logins (Mandriva/Suse/Fedora/slackware).

Slackware assumes you're the administrator and know what you're doing (I know, it's a novel concept); so if you want root access via sshd disabled, you'll disable it.

I have two firewalls and tcp/ip wrappers setting between me and the Internet. I'm not too worried about allowing root to login via sshd from our lan addresses.
Indeed, the default in sshd is to allow for root logins (check the manpage of sshd_config for PermitRootLogin), so it is allowed unless the distro explicitly disables it. If this is the only security concern we are talking about then disabling it in both the setups is equally simple (PermitRootLogin no, vs, DenyGroups admin).
eggi Story submitter ·
Guys,

Thanks for your comments - I always thought I had this board set up to auto-notify me if a thread was started, but I'm realizing that's not the case.

BTW, I don't allow comments on my blog, but do include my email address (eggi@comcast.net) in every script (Perhaps I should put it near the top of the page in a static element box to make it easier for folks to get in touch with me). I'm definitely interested in all feedback, as it can only make the site better. Unfortunately, even if I moderate comments, Google crawls me every day and has sent me warning about adult posts (waiting in moderation no less) on my site and I don't want them to shut me down. They are big dogs and may just be blowing steam, but I don't want to push it.

As for my own personal politics, I've been an admin for almost 13 years and was taught the trade in a company where they used rsh with a .rhosts pass for root (The complete opposite of security, in many ways other than that specific example), but it was a great place to learn, and then to learn again why I was doing everything incorrectly :P

I believe in either a very strongly encrypted (and/or convoluted) root password and no direct access. In my post, I was attempting to "clear the air" on some other posts I'd read about actually "removing the root user" entirely as a security measure (which would be a tricky proposition and probably not for most folks). I like sudo, but personally stick with using straight-up "su" with 4750 perms and having all the admin's who require root access to be in the only group that has access to even run su, and then also know the root password. I've toyed with s/key systems, for root password, as well, but found them to be hazardous (At least to my sleep ;), but (perhaps due to my writing style, which is a bit lengthy and effusive) I gave the wrong impression that I fully support the NoPassword sudo-only access to root method. I am still strongly in the "root should have a password and only a few people should know and only those people should be able to use su at all, if possible" camp.

Thanks, again, for all the feedback. You can email me direct anytime. I usually can't gaurantee a response more than once in a 24 hour period, but I can always be reached there. I'll be checking back here more often from now on. Nice to know someone's actually reading my blog ;)

Best wishes,

Mike
eggi, can you please break up the long root-should-have-a-password-and-only-a-few-people-should-know.... line? It makes all the comments in this thread expand to the right, under the menu. This makes them unreadable even on my 1280 wide screen.
eggi Story submitter ·
All set :)

Sorry about that. I'll keep that in mind for future responses. Thanks for the heads up!

, Mike

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post