On 08-Nov-03 Edenyard wrote:
For once, a non-hardware question from me!
What is the correct way of making 'ordinary' users (i.e., not root) able to shut the PC off at the end of the session? I find that (at least, on Slackware) an ordinary user can't use '/sbin/halt' or '/sbin/shutdown' because an error message is returned, saying something along the lines of "You must be root do do that".
I've checked the permissions of /sbin/halt and /sbin/shutdown and they're both rwxr-xr-x, so I don't think that's the problem. I know that ordinary users can use Ctrl+Alt+Del and that works well here, turning off the power at the end of the shutdown procedure, but it would be nice to be able to make the 'shutdown' command in the IceWM menu work for ordinary users, too.
Thanks for any clues on this one!
One solution is to install a root-owned cron job which, every minute, looks for a file (e.g.) /var/user.shutdown and, if it finds it, deletes the file and then runs /sbin/shutdown on root's behalf.
Then you need to arrange it that when the user does whatever the user does to shutdown, all this achieves is something like
touch /var/user.shutdown
with, possibly, a reassuring message like "The system will start to shut down within 1 minute". Don't know what you have to do to arrange this using IceWM.
(Think "Dungeons and Dragons")
Best wishes, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 167 1972 Date: 08-Nov-03 Time: 12:36:59 ------------------------------ XFMail ------------------------------