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/)

r3sistance 10-18-2009 02:33 PM

> Quakeboy02

Should be safe since that line should still require a password, however are you certain you don't have any open ports and are not running a service like SSH? Some distributions ship with SSH live and open.

Also I once saw a guy do "sudo rm -rf /*" at work... just having to put sudo infront doesn't stop you doing it if your use to typing sudo when doing similar commands. Personally I have never even got anywhere close to executing that command however.

Quote:

Originally Posted by smeezekitty (Post 3723949)
Ubuntus horrable prompts remind me of windows vistas UAC
that i disabled the first day

As has already been said, you are a security hole ya know, UAC was introduced so that people would not browse the internet as administrator and the prompts only come up with things are asking to be installed. However UAC is only a half-arsed attempt at security because it's still by-passable by viruses (IE conflicker) and we don't know actually how secure that prompt really is... could it be hi-jacked?

It's actually safer to have a seperate administrator account and user account (the traditional Windows Method and similarly the method I use on my Mac), however there are applications that actually take advantage of this EXTREMELY bad method of administrating a PC... it's really rather shameless how professional software development companies require administrator rights for their applications for them to be run at all and this is when they are already installed.

Quote:

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

I think jschiwal's post #25 explains that.

That wasn't the point I was making, the point I was making is that your saying we should respect the way the developers want it done is not true if they are using things from other developers and not respecting the way developers intended those tools to be used.

However even so as Jschiwal's post also says, it's a bad thing. I am yet to see what protection this is all suppose to offer anyway. I mean most if not all up-to-date distributions warn you heavily about login in as root on GUI or stop you all together on the and I can't see what on the CLI would be any more open to being logged in as root over using sudo.

All I really see coming out of it, is teaching people how to abuse SUDO and not really consider using sudo for things like only giving people the privellages on the indivual commands or scripts that they need.

smeezekitty 10-18-2009 02:49 PM

one good advice would be
look at the command before you execute it
and if you see you have executed something bad (like sudo rm -r /) first try control+C
if that fails cut the power

Quakeboy02 10-18-2009 02:49 PM

Quote:

Originally Posted by r3sistance (Post 3724032)
> Quakeboy02

Should be safe since that line should still require a password, however are you certain you don't have any open ports and are not running a service like SSH? Some distributions ship with SSH live and open.

Sorry, I mis-spoke. I meant that my firewall doesn't have any open ports. Yes, there are several ports open on my machine for use on my local network.

Mostly I was just pointing out that logging in as root is akin to carrying a loaded gun with the safety off. Sudo is like that safety, but if you always use sudo, you get the habit of turning the safety off at any excuse. That's not good, either. In my case, I do very little maintenance work, so I'm not a victim of habit. The few admin things (mostly updates) that need to be done in the GUI force gksu to come up, so I'm protected on that front.

You poor buggers that deliberately expose ports to the internet: good luck! :)

r3sistance 10-18-2009 03:28 PM

Alot of computers aren't even running a firewall or behind a hardware one... I know where I work it's a part of our policy to enable the OS supplied firewalls by default with necessary ports open, but would you believe some of our customer's rather then put up with the luxery of opening/closing ports on the firewall would rather just turn the damned thing off... I kid you not. I always advise the customers against such actions of course.

Sudo is as much a safety latch as SU or login as root, you don't login as root unless your doing things that need to be ran as root. In reality it doesn't stop you killing a system if you run the wrong command... The only thing that stops that is not doing none root activities as root in the first place. You shouldn't need to be root or have root to remove directories if user settings are set correctly as most of the file system you shouldn't really be touched that often, mostly what you should be touching is in /home and should already be under your control to remove.

Quote:

Originally Posted by smeezekitty (Post 3724050)
one good advice would be
look at the command before you execute it
and if you see you have executed something bad (like sudo rm -r /) first try control+C
if that fails cut the power

Actually I'd advise Control + Alt + Delete if Control + C. Powering off the machine while you KNOW the hard drive is being written to is going to mess things up as well.

unSpawn 10-18-2009 04:48 PM

Quote:

Originally Posted by r3sistance (Post 3724032)
the point I was making is that your saying we should respect the way the developers want it done is not true if they are using things from other developers and not respecting the way developers intended those tools to be used.

I do not see how the .*buntu people disrespect the Sudo developers work. Correct me if I'm wrong but wrt sudo there's only common sense and best practices, no rules or regulations I know of the Sudo developers impose on usage.


Quote:

Originally Posted by r3sistance (Post 3724032)
However even so as Jschiwal's post also says, it's a bad thing.

No I meant him explaining about the need for sharing the root password or not.


Quote:

Originally Posted by r3sistance (Post 3724032)
All I really see coming out of it, is teaching people how to abuse SUDO and not really consider using sudo for things like only giving people the privellages on the indivual commands or scripts that they need.

That's something I can kind of agree on. If a distribution does not explain why a user should not log in as root but at the same time advertises to just stick "sudo" in front of every command, sane or not, then it's actually as bad as logging in as root. However a distribution is not the only party to blame. I'm thinking users who don't care an ounce for Linux architecture and concepts, reading the documentation or lack common sense and just want "something done right now" regardless of the implications. And equally bad are answers that say "just stick sudo in front of it" without considering the implications.


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