LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-03-2016, 05:43 AM   #16
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,591

Rep: Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687

Quote:
Originally Posted by /dev/random View Post
Spoken like a true Windows warrior, what is the difference between using a static account (root) and a user that has sudo access? Nothing at all.. here is why:

So you have no root password on your system, cool, however what do you login with via SSH? You user? so when that gets cracked, what is the difference between root and sudo -i? or sudo su? the answer is nothing.

In fact, using a root account is more secure then using sudo and here is why:

1) sshd by default doesn't allow root to login, so if the admin was smart about this his account would be a totally normal account without sudo access and when its required just su to root.

2) Using this the attacker actually has to crack two accounts not just a user who is prevleged... its just a weak argument against having a root account..


3) This is Windows security through obscurity bs, sudo only exists because ubuntu wanted to Windowize Linux to being it closer to the masses (which it didnt do).




sudo was never designed to paper tail everyone, here is a simple fact, The real admins who can be trusted don't need to be logged, their is no reason why a user needs to play with any utilities that require root access. sudo is basically the UAC of Linux nothing more nothing less, most vetted admins that run more then Linux and BSD will laugh at you for thinking sudo has some super powers over su.
You start out incorrect, then make points totally off the track. By your logic if only trusted admins are allowed on a system it needs no logging?

The primary purpose behind sudo is to allow one user to execute an allowed command as a different user without knowing that second users password: su cannot do that. If it could, it would be sudo.

To go beyond what has already been said would be to engage in pointless arguing. I stand by what I have said, and that should be enough.
 
Old 05-03-2016, 09:30 AM   #17
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by wpeckham View Post
You start out incorrect, then make points totally off the track. By your logic if only trusted admins are allowed on a system it needs no logging?

The primary purpose behind sudo is to allow one user to execute an allowed command as a different user without knowing that second users password: su cannot do that. If it could, it would be sudo.

To go beyond what has already been said would be to engage in pointless arguing. I stand by what I have said, and that should be enough.
Re-read your first post, my points are where they need to be, defending the root account. Instead of jumping on the "sudo is more secure because..." wagon.

Even if you had only sysadmins on a system, you would still need logging, just logging a trusted users every move is a waste of space that requires unnecessary maintenance over the years. You still need to log remote connections, services, system messages, you just don't need to turn a machine into a Siberian gulag.

If you are that keen on allowing users to execute commands that require root access add them to a group that allows that. Or if you really must and you have no way out... configure sudo to ONLY allow that one command (no sudo -i, so remove ALL:ALL) and use something like gresecuity or SELINUX to limit sudo access even further. Otherwise using root + some groups for trusted users is just fine, we have been doing it for years before the creation of sudo.
 
Old 05-04-2016, 05:10 AM   #18
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,591

Rep: Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687Reputation: 2687
ok, this may be my fault...

Why do you insist on misunderstanding what I say? Was I that unclear?
Perhaps I was, so let me try again.

Quote:
If you are that keen on allowing users to execute commands that require root access add them to a group that allows that. Or if you really must and you have no way out... configure sudo to ONLY allow that one command (no sudo -i, so remove ALL:ALL) and use something like gresecuity or SELINUX to limit sudo access even further. Otherwise using root + some groups for trusted users is just fine, we have been doing it for years before the creation of sudo.
The purpose of sudo is NOT to run commands with root access. That does work, but is a side effect of the more general case that is what sudo REALLY is for.

While early versions of sudo WERE for running a single command as root, it grew well beyond that quickly. The current definition (you can find this on Wikipedia) starts with
Quote:
sudo (/ˈsuːduː/ or /ˈsuːdoʊ/) is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user, by default the superuser.
So, yes, you CAN run things as root (as root is just another user account with elevated privileges) but that is only ONE kind of use. You can just as easily use it to run commands as a contained or less privileged user WITHOUT root access or using su! This is an incredibly useful tool if used properly. It does not replace root access, unless you use it the *buntu way which is as a special way to accomplish su - commands without a root password: in which case it does a pretty good job, but it (and you) are not so limited. That is rather like considering a shell as a user interface, and totally ignoring the scripting options.

The options on multiuser systems should be obvious. I had thought that the options beyond that on a linux box used for a single user for multiple purposes would also be obvious, but perhaps I was wrong.

My point is that it is not 'sudo' vs 'su' at all. They are both tools that exist to solve certain kinds of problems, and they solve different problems well. They should BOTH be available so you can solve those problems with the right tool.
 
Old 05-04-2016, 02:44 PM   #19
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,711

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Post

I should have added that I only use GNU/Linux on a home computer.
 
  


Reply

Tags
root, su, sudo


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo: effective uid is not 0, is sudo installed setuid root? awladnas Linux - Newbie 10 08-30-2014 06:03 PM
Question about the sudo command, specifically how to have sudo act as if user is root slacker_ Linux - Newbie 17 09-22-2013 03:48 PM
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
Unable to redirect all sudo messages to /var/log/sudo driftwood Linux - Server 2 10-18-2012 04:34 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration