[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Use of telinit by regular users



I am not a member of this mailing list, so please copy me on all replies.

I have a 4 year old laptop running potato (2.2r6). I use the various runlevels to
control the services that are running. I want a regular user to be able to
switch runlevels, but telinit seems to be able to only be run by root.

Is there a way to get around this?

Before you ask, security is not a concern on my system, I have very few users,
but I don't want to give them all root access so they can change runlevels.

The only thing I have thought of so far is to use the ctrl-alt-del keystroke to run a script (as root), much like it is currently set up to run the shutdown command.
The script would print a menu of available runlevels, read input from the
user, and then run telinit to change to the appropriate runlevel. I did this using the read command for input, but it froze the terminal I was working on. I think
there was a problem because when ctrl-alt-del was pressed, the script was
run by init, and not by the user on the current terminal, so it doesn't know where to get the input from. I'm not very good with bash, so I can't figure it out.
Any ideas?

Cam


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



Reply to: