Re: Problems with su/sudo
- From: Dave Seaman <dseaman@xxxxxxxxxxxx>
- Date: Thu, 20 Mar 2008 23:03:34 +0000 (UTC)
On Thu, 20 Mar 2008 16:02:26 -0500, Jolly Roger wrote:
In article <fruiml$60i$2@xxxxxxxxxxxxxxx>,
Warren Oates <warren.oates@xxxxxxxxx> wrote:
In article
<jollyroger-CC00AC.13113320032008@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Jolly Roger <jollyroger@xxxxxxxxx> wrote:
You use 'su' to "switch users", so you'll need to provide the password
for the user to which you are switching. The 'sudo' command will ask for
the current user's password by default. In this case, since you have
already switched to the administrator account, that is the password
you'll need to use.
su stands for "substitute user" and sometimes "super user"
Semantics, but ok that's fine with me. The point is you switch to the
admin account on the command line and then sudo from there.
Try this:
sudo su
[password]
cd;whoami;pwd
um...
Which obviously won't work on most Mac OS X base installs, because root
(super user) is disabled in the default configuration, which is a Good
Thing?.
Having the root account "disabled" (in Apple's unfortunate terminology)
merely means you can't become root by typing a root password, since there
isn't one. It doesn't mean you can't become root by other means.
Obviously, there are lots of root processes running all the time, as ps
readily shows. Booting in single-user mode, and running "sudo", are other
ways to become root without typing a root password.
Indeed, the above sequence does work from an admin account in the default
configuration. The effect of "sudo su" is to run the "su" command as
root, which means that "su" in this case does not require a password.
As an amusing aside, before posting this I tried the above sequence of
commands to verify that it worked. It did. I was logged in remotely to
my office Mac, and I ran the commands there because the window was handy.
I got this output:
[orion:~] $ sudo su
Password:
sh-3.2# cd;whoami;pwd
root
/var/root
sh-3.2#
So far, so good, but then the window went dead. No response to ^D, or to
"exit", or anything else. Oh, sh*t, I thought. What have I done now?
It turned out to be an exquisitely timed network outage. Nothing to do
with my Mac at all. After a few minutes, I was able to reconnect and
repeat the experiment with no ill effects.
--
Dave Seaman
Oral Arguments in Mumia Abu-Jamal Case heard May 17
U.S. Court of Appeals, Third Circuit
<http://www.abu-jamal-news.com/>
.
- References:
- Problems with su/sudo
- From: Gary Blount
- Re: Problems with su/sudo
- From: Wayne C. Morris
- Re: Problems with su/sudo
- From: Daniel Cohen
- Re: Problems with su/sudo
- From: Jolly Roger
- Re: Problems with su/sudo
- From: Warren Oates
- Re: Problems with su/sudo
- From: Jolly Roger
- Problems with su/sudo
- Prev by Date: Re: Is Mac advocacy really necessary?
- Next by Date: Re: Is Mac advocacy really necessary?
- Previous by thread: Re: Problems with su/sudo
- Next by thread: Re: Problems with su/sudo
- Index(es):
Relevant Pages
|