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

Re: Use of telinit by regular users



On Wed, Nov 13, 2002 at 01:00:20PM -0800, Cameron Dale wrote:
> 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?

Yes.

> 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.

That makes sense.

> 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.

apt-get install sudo
man sudo
man sudoers

It won't fix any ctrl-alt-delete problems, but when configured properly,
a user with sufficient permission can do "sudo telinit 5" (or whichever
runlevel they want), and after entering their password, telinit will
run (and change the runlevel).

-- 
Seneca
seneca-cunningham@rogers.com



Reply to: