From: Barry Margolin on
In article <4b3b98b9$0$6580$9b4e6d93(a)newsspool3.arcor-online.net>,
kmlincoln100(a)hotmail.com (Matthew Lincoln) wrote:

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

su requires you to enter the target user's password, and then starts a
subshell (or executes the shell with a command line, if you use the -c
option). It can be used to execute any commands, so long as you know
the target user's password (and if the target is root, you also have to
be in the wheel group).

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

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: Robert Riches on
On 2009-12-31, Barry Margolin <barmar(a)alum.mit.edu> wrote:
> In article <4b3b98b9$0$6580$9b4e6d93(a)newsspool3.arcor-online.net>,
> kmlincoln100(a)hotmail.com (Matthew Lincoln) wrote:
>
>> Sorry for this newbie question:
>>
>> at is the difference between "su" and "sudo" command ?
>>
>> Matthew
>
> su requires you to enter the target user's password, and then starts a
> subshell (or executes the shell with a command line, if you use the -c
> option). It can be used to execute any commands, so long as you know
> the target user's password (and if the target is root, you also have to
> be in the wheel group).
>
> 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.

--
Robert Riches
spamtrap42(a)verizon.net
(Yes, that is one of my email addresses.)
From: Kevin Collins on
On 2009-12-30, Matthew Lincoln <kmlincoln100(a)hotmail.com> wrote:
> Sorry for this newbie question:
>
> at is the difference between "su" and "sudo" command ?

The "su" command is a standard command to all (at least all I am aware of) Unix
and Linux operating systems. It allows a user to "switch user" (hence the name
"su") by providing the password for that user. The root user can use su to
switch user without providing a password.

The "sudo" command is an open-source, optional utility command that allows the
root user to configure commands to be run as another user by particular users
by authenticating with *their own* password (or optionally, no password).

HTH,

Kevin
From: Golden California Girls on
Matthew Lincoln wrote:
> Sorry for this newbie question:
>
> at is the difference between "su" and "sudo" command ?

man man

then look them up!
From: Moe Trin on
On 31 Dec 2009, in the Usenet newsgroup comp.os.linux.misc, in article
<slrnhjoe69.h4o.spamtrap42(a)one.localnet>, Robert Riches wrote:

>Barry Margolin <barmar(a)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
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9
Prev: chdir usage
Next: how to alias