Subject: RE: How do I allow users to run a single command as root?

From: Casper BodenCummins <[email-masked]>
Date: Mon, 19 Aug 1996 09:25:59 +0100

You're quite right, Rob: it /is/ a really bad idea if you don't know
what you're doing. However, we need to bear in mind that:

  (a) packages which control superuser execution are not generally
      found in distributed commercial UNICES (and how many sysadmins
      have the time or the inclination to seek out these packages?);
  (b) it is a valid and extremely useful feature which, like many
      aspects of UNIX, combine power and risk.

Any self-respecting UNIX administrator should make themselves aware of
the potential risks of the commands and facilities that they use. This
understanding is vital when making decisions about reducing risk, and in
knowing which solutions are available.

In this particular case, I agree with Rob that a utility like sudo is
the answer. We are particularly lucky with Linux that we have such a
variety of useful packages available.

Casper Boden-Cummins.

>----------
>From: 	Rob Browning[SMTP:[email-masked]]
>Sent: 	16 August 1996 16:25
>To: 	[email-masked]
>Cc: 	The recipient's address is unknown.
>Subject: 	Re: How do I allow users to run a single command as root?
>
>Casper BodenCummins <[email-masked]> writes:
>
>> What you need here is to set the setuid bit. Run this command as root:
>> 
>>    chmod +s filename
>
>Not to be nasty, but this is generally a *REALLY BAD IDEA* unless you
>know *exactly* what you are doing.  If "filename" was not designed with
>extremely careful attention to the fact that it's going to be run suid
>root, you can be opening up your system to all kinds of security
>attacks, or accidental disasters by enabling suid root.
>
>I'm talking about attention to things like explicitly setting the
>PATH, checking and setting IFS, etc.  If it's a perl script, using the
>"taint" checks helps, but you have to know enough perl to be able to
>fix the problems it reports.
>
>Don't do this.  Use sudo, super, or some equivalent.
>
>[end preach mode]
>
>--
>Rob
>
>

---

From: Rob Browning <[email-masked]>
Date: 19 Aug 1996 10:55:18 -0500

>       have the time or the inclination to seek out these packages?);

Hmm, I hadn't thought about that.  Ok, interesting consideration.

--
Rob