How do I make a User login shutdown my box?
Duncan Mercer
Duncan.Mercer at sams.ac.uk
Mon Sep 27 16:36:15 UTC 2004
Hi
Why not just set the shutdown function to run with superuser
privileges. IE set the SUID
bit. This way any user can shutdown your system.
BEWARE:- The default is not to let the standard user be able to
shutdown the system as this
is a security risk. Anyone shutting down the machine can put a bootable
floppy in a drive at
restart etc.
To set the SUID bit on shutdown you need to use " chmod +s " on the
file. You can then
add /sbin to your path and you are good to go.
Duncan
>I've got RedHat 8 on a Athlon box and I'd like a user logon to perform
a shutdown of the box.
>I was advised to do the following:
>I've added a user called 'Sleep' and added this user to the root group
via the User Manager
>program and made its login shell /sbin/shutdown in the /etc/passwd.
>I've added in the users directory 2 lines in the .bashrc of:
>PATH=$PATH:/sbin
**********************************************
Dr Duncan Mercer
Dunstaffnage Marine Lab
Dunbeg, Oban, Argyll,
PA37 1QA, Scotland
Phone +44 (0) 1631 559225
Fax +44 (0) 1631 559001
email:- Duncan.Mercer at sams.ac.uk
Web:- http://www.sams.ac.uk/
***********************************************
More information about the redhat-list
mailing list