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

Sudo on a mac

8 views
Skip to first unread message

Torsten Jørgensen

unread,
Apr 19, 2012, 11:23:59 PM4/19/12
to
SUDO(8) MAINTENANCE COMMANDS
SUDO(8)

NAME
sudo - execute a command as another user

SYNOPSIS
sudo -h | -K | -k | -L | -V

sudo -v [-AknS] [-g group name|#gid] [-p prompt] [-u username|#uid]

sudo -l[l] [-AknS] [-g group name|#gid] [-p prompt] [-U user name]
[-u user name|#uid] [command]

sudo [-AbEHnPS] [-C fd] [-g group name|#gid] [-p prompt] [-u
user name|#uid]
[VAR=value] [-i | -s] [command]

sudoedit [-AnS] [-C fd] [-g group name|#gid] [-p prompt] [-u
user name|#uid]
file ...

DESCRIPTION
sudo allows a permitted user to execute a command as the
superuser or another
user, as specified in the sudoers file. The real and effective
uid and gid are
set to match those of the target user as specified in the passwd
file and the
group vector is initialized based on the group file (unless the
-P option was
specified). If the invoking user is root or if the target user
is the same as
the invoking user, no password is required. Otherwise, sudo
requires that
users authenticate themselves with a password by default (NOTE:
in the default
configuration this is the user's password, not the root
password). Once a user
has been authenticated, a time stamp is updated and the user may
then use sudo
without a password for a short period of time (5 minutes unless
overridden in
sudoers).


Look, all the insulting inuendo about who is a better hacker on a mac
doesn't really
belong on the internet. It is not relly a nice thing to do, to notice
sudo without
any further comment - a bit haughtily - or to mention that you doubt my
capabilities
as a UNIX operator, that is an insult.

I am a Bachelor of Science in Computers, and know UNIX fairly well. I
am not a Systems
Operator and will never be, but I know my way around UNIX fairly well.

Now Machintosh is new to me - and there is a gimmick. When you create
an Administrator
account on a mac, the account does automatically add an entry in the
sudoers file with
that account, so that the admin account can perform root access
operations with sudo.

The string from Warren Oates, does actually work so cheers - but I like
to do things
straight so I use 'su' which stands for subuser and log in as root
after having enabled
the root account with Disk Utility, found in CoreServices - thanks for
the hint - and
then I am rock and roll.

Keep your insidio to yourselves.

Hi.

/Torsten

Warren Oates

unread,
Apr 20, 2012, 7:36:35 AM4/20/12
to
In article <2012042005235946915-info@stconinccom>,
Torsten Jørgensen <in...@stconinc.com> wrote:

> and
> then I am rock and roll.

> Keep your insidio to yourselves.

I like to share my insidio, but.

My mother would say to me, she'd say, "Son, you've got enough insidio
for everyone." When my second-grade teacher caught me with my insidio
showing, she'd ask "And did you bring enough for all of us?" and by
gawd, it turned out that I had and that sure showed her and then we all
dropped our rulers at exactly 8 minutes after ten.

RIP Levon. Gone to keep Emily company. Now _he_ was rock and roll.
--

... do not cover a warm kettle or your stock may sour. -- Julia Child

Jolly Roger

unread,
Apr 20, 2012, 9:11:08 AM4/20/12
to
In article <2012042005235946915-info@stconinccom>,
Torsten Jørgensen <in...@stconinc.com> wrote:

> Look, all the insulting inuendo about who is a better hacker on a mac
> doesn't really belong on the internet.

You made the claim that you are a very skilled Unix user; and it is very
obvious to those of us who know better that is not true. When others
pointed this out to you, you became upset with them. That's life; and
you'll have to figure out how you will deal with it. One way would be to
refrain from making that particular claim until it is actually true.

> It is not relly a nice thing to do, to notice sudo without any
> further comment - a bit haughtily

Excuse me? The sudo facility was suggested to you, yet you showed no
interest in it. Why should others explain more about things in which you
show no interest? If you had shown genuine interest and asked questions
as a sign that you were interested, someone surely would have answered
your questions - especially me in particular.

> - or to mention that you doubt my
> capabilities
> as a UNIX operator, that is an insult.

Son't make ludicrous claims like that, and you won't find yourself in
this situation.

> I am a Bachelor of Science in Computers, and know UNIX fairly well. I
> am not a Systems Operator and will never be, but I know my way around
> UNIX fairly well.

Untrue. You may have a BS but you clearly do not know Unix very well.

> Now Machintosh is new to me - and there is a gimmick.

Ooh, a gimmick? A trick to attract attention, publicity, or business?
This should be interesting...

> When you create an Administrator account on a mac, the account does
> automatically add an entry in the sudoers file with that account, so
> that the admin account can perform root access operations with sudo.

I hate to break it to you, but Mac OS X isn't the only operating system
that does such a thing. This allows administrators to use the sudo
facility. There's nothing flashy about it. And you have full control
over the sudoer configuration, so you can set it up to allow even
non-administrators access the sudo facility if you wish. How is this a
gimmick, exactly?

> The string from Warren Oates, does actually work so cheers - but I
> like to do things straight so I use 'su'

Using 'su' to switch to the root account is a bad idea for a few
different reasons, some of which have already been mentioned in this
thread.

Your instructors should have taught you to always try to run with as few
escalated privileges as possible, because (a) it reduces the *chance* of
privilege escalation accidents, and (b) it reduces the *impact* of
privilege escalation accidents that do occur.

> [su] stands for subuser

Technically, it stands for "substitute user identity". What it actually
does is switch you to another user account and start a new shell under
that user account.

> and log in as root

You can log in as root with 'su' by:

1. Enabling the root account.
2. Setting the root password.
3. Entering the 'su' command.
4. Typing the *root* password when requested.

Or you can log in as root with 'sudo su' by:

1. Entering the 'sudo su' command.
2. Entering *your own* password when requested.

You have stubbornly chosen the more cumbersome and less secure method,
despite advice from this group. Best of luck with that.

--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.

JR

John Varela

unread,
Apr 20, 2012, 4:13:58 PM4/20/12
to
On Fri, 20 Apr 2012 13:11:08 UTC, Jolly Roger <jolly...@pobox.com>
wrote:

> In article <2012042005235946915-info@stconinccom>,
> Torsten J°rgensen <in...@stconinc.com> wrote:
>
> > I am a Bachelor of Science in Computers,

Oooh.

> > [su] stands for subuser
>
> Technically, it stands for "substitute user identity". What it actually
> does is switch you to another user account and start a new shell under
> that user account.

I don't claim to know much about Unix, and the little I do know is
really about Linux, but I thought su stands for superuser.

--
John Varela

Steve W. Jackson

unread,
Apr 20, 2012, 4:40:29 PM4/20/12
to
In article <51W5y0sPNk52-pn2-Y37dUGsgpwdJ@localhost>,
The term superuser traditionally refers to the root account. The su
command, while frequently used to assume root authority, can actually
assume the identity of any account if you have the appropriate password.
--
Steve W. Jackson
Montgomery, Alabama

Richard Kettlewell

unread,
Apr 20, 2012, 5:21:45 PM4/20/12
to
"Steve W. Jackson" <stevew...@knology.net> writes:
> "John Varela" <newl...@verizon.net> wrote:
>> Jolly Roger <jolly...@pobox.com> wrote:
>>> Torsten J°rgensen <in...@stconinc.com> wrote:

>>>> [su] stands for subuser
>>>
>>> Technically, it stands for "substitute user identity". What it actually
>>> does is switch you to another user account and start a new shell under
>>> that user account.
>>
>> I don't claim to know much about Unix, and the little I do know is
>> really about Linux, but I thought su stands for superuser.
>
> The term superuser traditionally refers to the root account. The su
> command, while frequently used to assume root authority, can actually
> assume the identity of any account if you have the appropriate password.

"substitute user" dates from Unix V7. Previously the su command could
only become uid 0, and the V6 source code describes itself as "become
super-user". So the modern[1] interpretation is a probably a backronym.

[1] well, since 1979...

--
http://www.greenend.org.uk/rjk/

Steve W. Jackson

unread,
Apr 23, 2012, 10:12:27 AM4/23/12
to
In article <87vckuk...@araminta.anjou.terraraq.org.uk>,
Excellent info! My use of Unix only goes back to around 1990 and began
with an AT&T 3B2 system.
0 new messages