Slashdot Mirror


Sudo vs. Root

lessthan0 writes "In Mac OS X, the root account is disabled by default. The first user account created is added to the admin group and that user can use the sudo command to execute other commands as root. The conventional wisdom is that sudo is the most secure way to run root commands, but a closer look reveals a picture that is not so clear." The article is about OSX but the debate is a little older ;)

10 of 327 comments (clear)

  1. Re:Layered Security by Jason+Hood · · Score: 5, Insightful

    I honestly feel dumber for RTFA.

    --
    Are you intolerant of intolerant people?
  2. Sudo is only useful when there are lots of admins by eln · · Score: 5, Insightful

    When there are lots of admins, sudo can be helpful. However, even then it's mostly useless because most admins get so irritated at having to type sudo before every command that they'll just sudo into a shell and be done with it, which sort of eliminates most of the advantages of sudo. To get around this, you'd need a security admin that is not only diligent about what access he gives out, but is also willing to deal with a lot of abuse from the other admins because he won't let them do what they want to do.

    For a single-user system, sudo is pointless. Nearly everyone is just going to sudo into a shell to do anything where root is needed on their own personal box anyway.

  3. This just in: by djh101010 · · Score: 5, Informative

    News flash: Sudo, like many other tools, has a configuration file, which allows you to customize it's behavior. Details will be provided as they become available.

    C'mon, anyone with even a passing involvement with sudo has looked at the sudoers file. You can configure pretty much any group or role based permission you want; if you can describe it as a logical statement, you can do it in sudo. Yes, out of the box, you can sudo to a shell (or to an app which has a shell escape).

  4. Good Advice by Se7enLC · · Score: 5, Interesting

    This article is good advice for anyone running a unix-like operating system (OSX, Linux, etc). It's not knocking on OSX, just knocking on the default configuration. Sudo is really just a way to allow root access without allowing root logins. The best way to configure it: Root Account with a unique password (not the same as your user account) Sudo requires password to activate (caching is ok, but no automatic access, no keys) Sudo logs all commands Sudo only enabled for specific user accounts Root account has login disabled, ftp/ssh disabled. (using the /usr/bin/false trick mentioned in the article, I use true myself)

  5. Sudo vs. Root? by Evro · · Score: 5, Funny
    --
    rooooar
  6. Use sudo to revoke root from a single user by jrifkin · · Score: 5, Insightful
    One advantage of sudo occurs when a box has multiple admins, because a single admin can have his root privilege revoked without affects other admins.

    But when you share a root account, revoking privilege from a single admin means that every remaining admin has to learn a new password.

  7. The best way to secure the root account... by aurb · · Score: 5, Funny

    ...is to choose a really difficult password and forget it. This will secure the box from its' worst enemy - yourself.

  8. Phil Collins by Jon+Luckey · · Score: 5, Funny
    Phil Collins probably had fits when this didn't work:

    pcollins$ su su sudio

    --
    -- 3 events that reshaped the world in the 20th century: WW1, WW2, and WWW
  9. Re:Oh, great! by GoingDown · · Score: 5, Insightful

    When running "sudo rm -rf /" it still asks user's password if that user has not ran sudo before on that same environment. In Ubuntu, only FIRST user account created during installation is able to do sudo by default, rest of the accounts are not in wheel group and are not permitted to sudo. Root account is disabled, it is not "account without a password". So, you need to know password of wheel user to be able to use it.

  10. Re:MUCH MUCH Much better solution by TheCarp · · Score: 5, Insightful

    I would argue that this is even not needed.

    Just pick a good damned password.

    Seriously. Nobody really cracks passwords anymore. Sure there are the ubiquitous SSH scans on the net looking for just insanely stupid passwords. Pick a good password and move on.

    Firstly... any security discussion that starts with "what if they have your password" is flawed. They shouldn't have your password, if you let it go, or its THAT easy to guess.... then your security is broken right from the start and there is nothing you can do YOU ARE FUCKED.

    I worked at a place that did sudo for root passwords, and I thought it was one of the god damned stupidest things ever. The ONLY benefit of it, was that it forced us to figure out how to make secure passwords for root that people could easily memorize and taught us all to use mnemonics. That was seriously the ONLY benefit.

    Basically if you log in locally, or use ssh for everything, then your password never goes out in clear text. If you worry about ssh, then fine... use key authentication, then your password never gets used for anything but sudo.

    Basically.... this is a totally fake issue. If someone has your user account password, you are just screwed. They can trojan your entire environment such that the chances that you will EVER notice is minimal, and then they will just get the root password the very next time you sudo.

    Bottom line... protect your password... your security depends on it.

    -Steve

    --
    "I opened my eyes, and everything went dark again"