From: Nico Kadel-Garcia on
On Dec 30, 1:15 pm, kmlincoln...(a)hotmail.com (Matthew Lincoln) wrote:
> Sorry for this newbie question:
>
> at is the difference between "su" and "sudo" command ?
>
> Matthew

Please read the manual pages on questions like this, first. If you
don't have them at hand, they're online.

'su' basically allows a non-root user to gain root privileges, if they
have the root password. 'sudo' is considerably more sophisticated and
allows non-root users to have a sophisticated configuration in "/etc/
sudoers" that allows them to use their *own* password to get
privileges, to execute certain root-level commands without typing a
password, or to be permitted to use only a set of commands with their
own password.

sudo is far more powerful and sophisticated: su is lighter weight and
always works, even if some fool screws up the /etc/sudoers
configuraton file.
From: Douglas Mayne on
On Wed, 30 Dec 2009 18:15:21 +0000, Matthew Lincoln wrote:

> Sorry for this newbie question:
>
> at is the difference between "su" and "sudo" command ?
>
> Matthew
>
One difference is that sudo gives rights to a specified subset of
commands (as specified by the sudoers file) with the equivalent to the
root users's permission, whereas, su gives complete access to the root
account. sudo's approach is better in certain respects. First, there is
more fine grained control to allowed commands. Second, sudo's security
model is better. sudo users authenticate using their own password;
whereas, su requires directly knowing the root password. Again, sudo's
fine grained trust model is better because it avoids introducing a
"shared secret" involving the root password.

--
Douglas Mayne
From: Art Werschulz on
Hi.

Ryan McCoskrie <ryan.mccoskrie(a)invalid.invalid> writes:

> Matthew Lincoln wrote:
>
>> Sorry for this newbie question:
>>
>> at is the difference between "su" and "sudo" command ?
>>
>
> It's (mostly) a matter of the defaults.
> By default su gives you a session as another user unless
> given the -c switch, in which case it runs one command as
> another user. With sudo you need to use the -i to have a
> whole session as another user rather than just running one
> command.

You could also do (e.g.) "sudo bash".

--
Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker
GCS/M (GAT): d? -p+ c++ l++ u+ P++ e--- m* s n+ h f g+ w+ t+ r-
Net: agw(a)dsm.fordham.edu http://www.dsm.fordham.edu/~agw
Phone: Fordham U. (212) 636-6325, Columbia U. (646) 775-6035
From: Backpacker on
Matthew Lincoln wrote:

> at is the difference between "su" and "sudo" command ?

With any shell command, you should be able to get information on what it
does and how to use it by opening a shell window (also known as a console)
and entering, e.g. "man su" (without the quotes, of course). When you've
finished reading, press Q to quit.

--
Backpacker

From: Robert Riches on
On 2009-12-31, Art Werschulz <agw(a)dsm.fordham.edu> wrote:
> Hi.
>
> Ryan McCoskrie <ryan.mccoskrie(a)invalid.invalid> writes:
>
>> Matthew Lincoln wrote:
>>
>>> Sorry for this newbie question:
>>>
>>> at is the difference between "su" and "sudo" command ?
>>>
>>
>> It's (mostly) a matter of the defaults.
>> By default su gives you a session as another user unless
>> given the -c switch, in which case it runs one command as
>> another user. With sudo you need to use the -i to have a
>> whole session as another user rather than just running one
>> command.
>
> You could also do (e.g.) "sudo bash".

But, of course, only if the sudoers file allows it.

--
Robert Riches
spamtrap42(a)verizon.net
(Yes, that is one of my email addresses.)
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9
Prev: chdir usage
Next: how to alias