From: William Hubbs <williamh@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] sudo vs su
Date: Sun, 28 Feb 2010 14:42:26 -0600 [thread overview]
Message-ID: <20100228204226.GA28137@linux1> (raw)
In-Reply-To: <7c612fc61002281152h547e2e5fxf0812e14cd3954c2@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]
On Sun, Feb 28, 2010 at 12:52:01PM -0700, Denis Dupeyron wrote:
> Some systems are configured with a random root password. After a while
> you get tired of doing 'sudo <command>' all the time and would like to
> become root but you can't because you don't know the root password.
> One way around that is 'sudo su -' which allows to become root using
> your user password.
Actually, by default, sudo command uses your user password (it does
here anyway), and su - uses the root password. afaik sudo can be
configured to require the root password in the sudoers file, but it
doesn't by default. To test it, run this as a user:
sudo -i
That should ask for a password. Try your user password there. Once
you authenticate, you will be put in a shell with root's environment.
On the other hand, "su -" requires the root password and does the same
thing as "sudo -i".
In affect, when you run "sudo su -" what you are doing is running sudo
and authenticating to it. Then you are running "su -" as the command
you want sudo to run as root.
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-02-28 20:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-28 19:20 [gentoo-dev] sudo vs su William Hubbs
2010-02-28 19:52 ` Denis Dupeyron
2010-02-28 20:28 ` Graham Murray
2010-02-28 20:42 ` William Hubbs [this message]
2010-02-28 20:45 ` Alec Warner
2010-02-28 19:55 ` Mike Auty
2010-02-28 20:53 ` Alec Warner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100228204226.GA28137@linux1 \
--to=williamh@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox