Timeline for What is the difference between the sudo and su command?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 27, 2012 at 20:41 | history | edited | Aaron Lake | CC BY-SA 3.0 |
added 203 characters in body
|
Apr 27, 2012 at 20:37 | comment | added | Aaron Lake |
Again for brevity's sake I omitted the many alternative methods of using sudo . Also, you can't do su -c command by default on OS X, since you don't know root's password. You can, however sudo su , change the password, then su -c command . I feel that the question was answered, and there wasn't a need to dive deeper in to alternate uses of sudo and su. However I'll update the post for the curious folks.
|
|
Apr 27, 2012 at 20:33 | comment | added | el.pescado - нет войне |
"The key difference between sudo and su is sudo runs a command as root, whereas su makes you root" - false, sudo -s runs shell ("makes you root"), and su -c command runs command as root.
|
|
Apr 27, 2012 at 19:21 | comment | added | Aaron Lake |
@Joe, I considered adding that information but omitted for brevity. As you describe, sudo is quite a robust utility and covering even basic functionality here would ultimately confuse or overwhelm the target audience looking for a differentiation between sudo and su .
|
|
Apr 27, 2012 at 19:19 | comment | added | Joe |
the 'without additional options' is a pretty significant qualifier ... they'll both let you become users other than root ... eg, sudo su -lm _www will let you have as shell as if the webserver user (by running the command as root, as it doesn't have a valid password)
|
|
Apr 27, 2012 at 18:26 | comment | added | binarybob |
In simple language terms sudo can be though of as super user and do . As an additional point, on OS X, once you have successfully authenticated you may then use sudo without a password for a short time (5 minutes by default, unless overridden in sudoers ) after which you will have to type the password again.
|
|
Apr 27, 2012 at 16:01 | vote | accept | whitefleaCH | ||
Apr 27, 2012 at 15:51 | history | answered | Aaron Lake | CC BY-SA 3.0 |