From: SINNER on
* GangGreene wrote in comp.os.linux.misc:

> SINNER wrote:
>
>> * GangGreene wrote in comp.os.linux.misc:
>>
>>> SINNER wrote:
>>>
>>>> * Chris Cox wrote in comp.os.linux.misc:
>>>>
>>>>> Matthew Lincoln wrote:
>>>>>> Sorry for this newbie question:
>>>>>>
>>>>>> at is the difference between "su" and "sudo" command ?
>>>>>
>>>>> sudo is a more flexible and feature full way of doing something
>>>>> as another user. Has more options allowing for things like
>>>>> executing only specific commands, executing things without
>>>>> password, etc. It's closer to allowing role based security.
>>>>>
>>>>> su is pretty basic.
>>>>
>>>> You have that backwards. su opens a shell as that user, from there
>>>> you can do anything as the new user. sudo limits you to one command
>>>> and is far more limited.
>>>>
>>>> sudo elevates your permissions, su makes you the specified user.
>>>>
>>>
>>> Wrong!
>>
>> Really? what did I say that was wrong?
>
>
> ">> sudo limits you to one command and is far more limited."
>

Which is correct

$ sudo <command>

Using sudo to grab an interactive login shell is another story entirely.

In your example after sudo -i you arent using sudo anymore, nothing you
do after that point is logged unlike in the above example.

--
David
From: John Gordon on
In <4b3b98b9$0$6580$9b4e6d93(a)newsspool3.arcor-online.net> kmlincoln100(a)hotmail.com (Matthew Lincoln) writes:

> Sorry for this newbie question:

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

su lets you log in as another user. Once logged in, you can do anything
that user could do.

sudo lets you perform only some commands as another user, and also
keeps a log of what you did.

--
John Gordon A is for Amy, who fell down the stairs
gordon(a)panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

From: brie aleida on
On Dec 30 2009, 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

This article has a very good description:

http://www.tuxmagazine.com/node/1000148

The man commands for each will also provide additional insight.

--
Brie
From: François Patte on
Le 30/12/2009 19:15, Matthew Lincoln a �crit :
> Sorry for this newbie question:
>
> at is the difference between "su" and "sudo" command ?

su means that you become the super-user with right of death on the whole
system

sudo is followed by the name of a command which can only be used by the
super-user, but you are not the super-user, you have only the right to
use pre-defined commands.


--
Fran�ois Patte
Universit� Paris Descartes
From: john.r.avery on
On Dec 30 2009, 1:15 pm, kmlincoln...(a)hotmail.com (Matthew Lincoln)
wrote:

> Sorry for this newbie question:
> [wh]at is the difference between "su" and "sudo" command ?

> Matthew

One *relatively* simple answer I've not yet seen:

su:
comes standard with most or all versions of unix/linux.
it simply allows you to *become* any other user on the system, so that
you can see their files & directories and possibly run programs *as*
them. There are two different ways to execute "su": one as simply
"su", followed by an optional username if you don't want to become
"root"; the other is to add the minus-sign, "su -". To understand the
difference, you must understand how shell-initialization works, with
such files as ".cshrc" or ".profile" and ".kshrc", etc. Too
complicated to explain here.

sudo:
typically an add-on program, though it might often be included with
various flavors of Linux.
It's primary purpose is *not* simply to become some other user on the
system --although I believe this can be accomplished with sudo-- but,
rather, to allow you to execute specially-priviledged commands,
usually restricted to the super-user (root). I don't recall ever
hearing of anybody's using sudo to allow a person to execute specially-
priviledged commands of some user *other* than root though maybe it
can be done and maybe it sometimes is done.

NOTE: "su" and "sudo" *each* are configurable as to which users are
allowed to use them. However, I believe that there is only one
permission-file & one permission-setting for "su": either you are
allowed to use "su" or you are not allowed to use it. But with sudo,
the allowable permissions are highly configurable, at least regarding
the various commands/programs that the user is granted to execute (at
least as "root"; again, not sure about other users).

Note also: The use of the password with sudo is *not* specific to
Ubuntu.

Hope this helps.

--JRAvery
First  |  Prev  | 
Pages: 1 2 3 4 5 6 7 8 9
Prev: chdir usage
Next: how to alias