Find the answer to your Linux question:
Results 1 to 5 of 5
Just curious (well maybe more than just curious), what are the security advantages and disadvantages of using sudo instead of a root account? I've read it's better security practice to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942

    What's the deal with sudo?


    Just curious (well maybe more than just curious), what are the security advantages and disadvantages of using sudo instead of a root account? I've read it's better security practice to use sudo, but no reasons why. Anyone care to clarify?

    Thanks!
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

  2. #2
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    I think there is a good answer to that here :
    https://help.ubuntu.com/community/Ro...45454d6ded2fac

    Personally, using "sudo" is just a reminder that my actions are done "as root". The fact that "sudo" only confers temporary root privileges is what I like the most about it. No need to login and logout of the root account.

    On the contrary, when using root I always fear that I might forget logging out.
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  3. #3
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Couldn't you just do su -c <command>?
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    As to whether using sudo is a "better" security practice is subjective.

    There are situations where a *nix box has multiple admins, or even power users, who require elevated privileges for just certain tasks. In these situations sudo is an excellent choice, because the main admin doesn't have to give out the root password to anyone else.

    Although I don't agree with all the points at that ubuntu documentation site, it does refer to another very good feature of sudo: it provides an audit trail of which commands were run using it.

  6. #5
    Linux Newbie burntfuse's Avatar
    Join Date
    Nov 2006
    Location
    Laurel, MD
    Posts
    158
    Besides, that way only the things that need to be run as root are run as root.
    I have sold my soul to the penguin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •