Quoth netvision on Sat, Jul 22, 2000:
> 2.  Set the sticky bit in the executable.
> 
>      #chmod u+s myshut

It's setuid bit.  Sticky bit is +t.

> 3. That's all. Invoking 'myshut' by any user will issue the work...

Or you can take the BSD approach:

1. Add users allowed to shutdown to some group (call it
   "operator").

2. Make shutdown owned by user root, group operator:
        # chown root.operator /sbin/shutdown

3. Make shutdown runnable only by operator, setuid root:
        # chmod 4550 /sbin/shutdown

Vadik.

-- 
Real software engineers don't debug programs, they verify correctness.
This process doesn't necessarily involve execution of anything on a
computer, except perhaps a Correctness Verification Aid package.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to