Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: What is the difference between "su" and "sudo" ?

0 views
Skip to first unread message
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Moe Trin

unread,
Dec 31, 2009, 11:00:52 AM12/31/09
to
On 31 Dec 2009, in the Usenet newsgroup comp.os.linux.misc, in article
<slrnhjoe69.h...@one.localnet>, Robert Riches wrote:

>Barry Margolin <bar...@alum.mit.edu> wrote:

>> sudo requires you to enter your own password. It checks a
>> configuration file (/etc/sudoers) to determine who is allowed to
>> execute different commands.

>Whether you have to enter a password, and which password you have
>to enter, is configured.

Yup

>From what I have read, the thing of entering your own password
>appears to be a Ubuntuism

http://www.courtesan.com/sudo/man/sudoers.html

That's the sudo'ers manual. See the entry for rootpw

rootpw
If set, sudo will prompt for the root password instead of the
password of the invoking user. This flag is off by default.

as well as the 'runaspw' and 'targetpw' entries. Asking for the
users password has been the default in many distributions, and if you
are compiling from source. That goes back well before Ubuntu appeared
on the scene.

One reason why Ubuntu uses this mode is that by intent there is no
valid root password. This is to prevent the windoze default mode of
running as the administrative user.

Old guy

Message has been deleted
Message has been deleted

Florian Diesch

unread,
Dec 31, 2009, 12:59:20 PM12/31/09
to
Robert Riches <spamt...@verizon.net> writes:


>> sudo requires you to enter your own password. It checks a configuration
>> file (/etc/sudoers) to determine who is allowed to execute different
>> commands.
>
> Whether you have to enter a password, and which password you have

> to enter, is configured. From what I have read, the thing of
> entering your own password appears to be a Ubuntuism. I use sudo
> all the time and have never seen the practice of entering my own
> password to use sudo.

It's often used if you don't want to change the root password every time
somebody leaves the admin team and of course it's the only sane thing if
you want to give only partial sudo access to somebody.


Florian
--
<http://www.florian-diesch.de/software/shell-scripts/>

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

brie aleida

unread,
Jan 7, 2010, 5:41:14 AM1/7/10
to
On Dec 30 2009, 1:15 pm, kmlincoln...@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

François Patte

unread,
Jan 17, 2010, 5:09:03 PM1/17/10
to
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

john.r.avery

unread,
Jan 17, 2010, 5:31:11 PM1/17/10
to
On Dec 30 2009, 1:15 pm, kmlincoln...@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

0 new messages