LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   how come sudo doesnt make it so anybody can become root? (https://www.linuxquestions.org/questions/linux-security-4/how-come-sudo-doesnt-make-it-so-anybody-can-become-root-760679/)

jayjwa 10-16-2009 03:01 AM

Quote:

Originally Posted by Hangdog42 (Post 3714485)
I wish the *buntus would stop this and just use root and sudo the way they were intended. Sooner or later this sort of behavior is going to cause a huge security breach in the *buntus.

Agreed. We now have an entire generation of Linux users who want to stick sudo in front of everything they need to do as root, which is not what sudo was meant for. It's meant to delegate specific tasks to specific users using specific parameters, not as an "are you really sure you want to do that as root? If so, prefix with 'sudo' so I know"-type safety switch. I say we start a proper sudo usage compaign: it can be called "su-don't".

r3sistance 10-16-2009 02:59 PM

Quote:

Originally Posted by Wim Sturkenboom (Post 3713065)
So you are the actual security hole

Bit harsh I guess =P, unfortantly true. I have never really liked the way the *Buntus work to be honest tho, it's a complete abuse of sudo and it doesn't really encourage security like it's suppose to, infact possibly just makes the situtation worse in some cases.

If you wanna make a safe distributions, how about one that warns a user every time they use an unencrypted protocol (IE FTP, VNC) across the internet that other people maybe able to view their username and password.

Also ubuntu doesn't encourage things like locking down /tmp in ways that reduce the number of rootkit vunabilities you have...

I am curious with Ubuntu, what happens if you need to run a manual FSCK and it requires the maintainance password... is that the initial user password? or does this lead to a whole different level of headaches. Or worse yet, does it let just anybody into the maintainance terminal =P?

But as it goes, user apathy to server security/protection is my number 1 reason why servers get hacked (any OS). While direct logins as root and browsing the internet as root are on the list of insanely crazy things to do, most OSs disable or warn about GUI root logins and SSHD is easily configurable to disable direct root logins... but leave the benefit of "SU" and/or console root logins can be in my opinion beneficial and just easier...

Hangdog42 10-17-2009 07:49 AM

Quote:

If you wanna make a safe distributions, how about one that warns a user every time they use an unencrypted protocol (IE FTP, VNC) across the internet that other people maybe able to view their username and password.
I wish it were that easy. As Microsoft has THOROUGHLY proven, bugging the user about insecure behavior is futile at best. Unfortunately there is no OS level solution to user ignorance and apathy. What is equally disturbing is the number of users who feel they need to be root ALL THE TIME. I don't know about anyone else, but once I've got all my software installed, I can go weeks without needing to be root. The bottom line is we need smarter users, and that isn't gonna happen anytime soon.

Quote:

I am curious with Ubuntu, what happens if you need to run a manual FSCK and it requires the maintainance password... is that the initial user password? or does this lead to a whole different level of headaches. Or worse yet, does it let just anybody into the maintainance terminal =P?
My understanding is that the *buntus give root privileges to the first user that is created via sudo. So technically they aren't root, but effectively they are just by using sudo in front of the command. In your example, running sudo fsck and supplying the initial user's password should do the trick. Later users aren't awarded this privilege by default, but on a single user machine, the damage is done. I'm just waiting for malware to appear that simply uses sudo to escalate on *buntu installs.

Quote:

SSHD is easily configurable to disable direct root logins.
Now if distros would just ship with root disabled in SSHD. I bet there are tons of users that don't even know SSHD is running, let alone that you can log in using root. I suppose this is one area where the *buntu approach actually has a benefit. Since there isn't a root account you can log into (unless you activate it), it doesn't matter if sshd allows root login.

pixellany 10-17-2009 08:06 AM

This thread is perhaps past its prime, but my buttons have been pushed....;)

I had a chat with a Ubuntu rep at the last SCALE. He was arguing that their no-root-user weirdness was actually a plus for security. I don't remember what the rationale was, but I was not impressed. Since then, I have read about people being disciplined on the Ubuntu fora for divulging the "secret" to enabling the root account. Bad dog, Ubuntu---BAD Dog!!

As for "sudo bash" creating a security hole, consider some other security holes:
  • You can typically reboot into a machine in single-user mode and get root powers with no password.
  • If that doesn't work, you can boot from a liveCD and disable the password in the installed system.
  • CD booting disabled and the BIOS password-protected? Open the case, and reset the CMOS.

If you want real security, you have to control who has physical and network access to the hardware.

unSpawn 10-17-2009 08:40 AM

Quote:

Originally Posted by pixellany (Post 3722695)
Since then, I have read about people being disciplined on the Ubuntu fora for divulging the "secret" to enabling the root account.

You're probably referring to http://ubuntuforums.org/showthread.php?t=716201. I think users should respect how a distribution envisions it to be used. Especially if they're new to GNU/Linux it could be beneficial. More experienced users or users not wanting to do that could easily switch to another distribution with different rules of play, better suitable release schedules, social contract or not, herd-like behaving usergroups, SPOF maintainers or whatever else unique selling points they favour.

However in no way should the uninformed actions of an OP who clearly does all the right stuff for all the wrong reasons be left unchallenged.

pixellany 10-17-2009 08:51 AM

I can see your logic, but let's try a loose analogy:
Suppose I check in to the ArchLinux forum and post something on how to disable pacman and set up Arch with Synaptic.....Or maybe how to get rid of rc.conf and replace it with something more "normal". Will I get disciplined or ejected from the forum? I think not.

Carrying it further: Suppose I posted instructions on how to set up Arch to be like Ubuntu? They are still not going to punish me. LAUGH AT ME--perhaps.

I'm obviously in the camp that NO-ONE should be practicing thought control.

AND--look at Mint: They don't bother just **telling** you how to have a root account---they put it in the installer as an option.

pixellany 10-17-2009 08:58 AM

Another slightly more obscure analogy:

Circa 1970, I pull the 2-speed Powerglide out of my Chevy Impala, and replace it with a 3-speed hydramatic. Off to the dealer to get the right speedometer gears.

Tell dealer person what I have done. Answer: "You can't do that."

Showing him the actual car in which I had successfully driven to his establishment did not seem to make an impression.....


Moral: The world is full of people who are quite willing to decide how you **should** do something, but there is only ONE person who **should** be making the decision. I want Ubuntu to advise me, not to dictate.

r3sistance 10-17-2009 10:31 AM

To be honest what put me off of Ubuntu was it's inability to actually work on any system I put it on, it's probably more compatible by now but when I place it on my state of the art white boxes I just use to get so many graphical glitches and compatibility issues it wasn't worth it. Now I just use CentOS since I am use to dealing with it so much as it's the mode OS used in the data center that I work in. Also I rarely get graphical problems with CentOS...

But as for Ubuntu's Security, naturally as I never got on with it, it wasn't til I came across servers that used it that I found out just how annoying the whole distribution actually is when you ignore the putrid orange interfaces... The whole not allowing logins as root is something I just by-pass in 10 seconds if I do have to use it for some reason, I am after all in my line of work, use to having to by-pass people securing themselves so well they secure themselves out of their own servers.

smeezekitty 10-17-2009 12:13 PM

this is whyy i dislike Ubuntu


Quote:

Originally Posted by pixellany (Post 3722695)
  • You can typically reboot into a machine in single-user mode and get root powers with no password.
  • If that doesn't work, you can boot from a liveCD and disable the password in the installed system.
  • CD booting disabled and the BIOS password-protected? Open the case, and reset the CMOS.

you cannot do any of this over a network so its of no concern to me and alot of other users

jschiwal 10-17-2009 12:23 PM

The main advantage of sudo allow certain users and administrators to run root commands without needing to distribute the root password. You can temporarily give someone permission to run sudo and then remove this privilege later.

Also look at using PolicyKit for the types of things that regular users may commonly need to do. For example, there may be a setting to allow a user install updates. This would allow a user click OK in the updater applet without then needing to enter the root password. Or perhaps allow the user to change the pulse audio setting to high priority.

It can be difficult totally eliminating holes in using sudo. Such as using rvim; forbidding "sudo su -"; using a different mail server without an escape character, etc. It may be combined with kernel auditing to audit all root commands. IMO, this is more likely the case for servers where an inflexible policy is more useful.

The only difficulty I would have with Ubuntu is using redirection is more difficult. The > and < operators manipulate files with the privileges of the "sudo" command not the command you are running.

r3sistance 10-18-2009 06:19 AM

Quote:

Originally Posted by unSpawn (Post 3722714)
I think users should respect how a distribution envisions it to be used. Especially if they're new to GNU/Linux it could be beneficial.

Something suddenly occured to me on this statement, if you say that users should respect how the developers envisioned them to use Ubuntu, could the same also not be said that Ubuntu should respect how the developers of Sudo envisioned it to be used, as Ubuntu uses it as a near enough full swap out for root, what Sudo was never meant to do, SU was already there for that purpose.

unSpawn 10-18-2009 10:35 AM

Quote:

Originally Posted by pixellany (Post 3722722)
I can see your logic, but let's try a loose analogy:
Suppose I check in to the ArchLinux forum and post something on how to disable pacman and set up Arch with Synaptic.....Or maybe how to get rid of rc.conf and replace it with something more "normal". Will I get disciplined or ejected from the forum? I think not.

Carrying it further: Suppose I posted instructions on how to set up Arch to be like Ubuntu? They are still not going to punish me. LAUGH AT ME--perhaps.

I'm obviously in the camp that NO-ONE should be practicing thought control.

And I'm of the opinion that all people require thought control. Except some people require more thought control than others ;-p Seriously, from your reply I get the idea you're more opposed to how this distribution advertises usage than anything else. And as far as I know you don't even use .*buntu, right?


Quote:

Originally Posted by r3sistance (Post 3723656)
Something suddenly occured to me on this statement, if you say that users should respect how the developers envisioned them to use Ubuntu, could the same also not be said that Ubuntu should respect how the developers of Sudo envisioned it to be used,

I think that would hold true if Sudo came with explicit usage instructions. AFAIK it does not. (I do get what you mean though.)


Quote:

Originally Posted by r3sistance (Post 3723656)
as Ubuntu uses it as a near enough full swap out for root, what Sudo was never meant to do

I think jschiwal's post #25 explains that.

smeezekitty 10-18-2009 12:43 PM

Ubuntus horrable prompts remind me of windows vistas UAC
that i disabled the first day
i feel restricted in ubuntu so i do not use it
and i feel i have to warn other people about it

Quakeboy02 10-18-2009 02:09 PM

This is an interesting thread. I very rarely login to root; preferring to do almost all maintenance activity with sudo. For me this works because I don't really do that much maintenance activity, and "command not found" or "must be root" (whatever the actual messages are) are enough to remind me to use sudo. This is good, because I don't accidentally do the infamous "rm -rf /". :)

Does it make my system less secure having "myuserid ALL=(ALL) ALL"? Probably. But, I don't have any open ports, so the risk is small on a home-user desktop. I can see that in a larger installation, or on a web-open install, I might want to set aside different sudo users for different maintenance activities; even if there was only just me. I'm not convinced that logging in to root is the right option, though.

smeezekitty 10-18-2009 02:22 PM

Quote:

Originally Posted by Quakeboy02 (Post 3724014)
This is an interesting thread. I very rarely login to root; preferring to do almost all maintenance activity with sudo. For me this works because I don't really do that much maintenance activity, and "command not found" or "must be root" (whatever the actual messages are) are enough to remind me to use sudo. This is good, because I don't accidentally do the infamous "rm -rf /". :)

Does it make my system less secure having "myuserid ALL=(ALL) ALL"? Probably. But, I don't have any open ports, so the risk is small on a home-user desktop. I can see that in a larger installation, or on a web-open install, I might want to set aside different sudo users for different maintenance activities; even if there was only just me. I'm not convinced that logging in to root is the right option, though.

like 5 mins ago i was browsing the internet as root LOL


All times are GMT -5. The time now is 07:30 PM.