LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how can i allow a power user 2 shutdown linux boz from console (https://www.linuxquestions.org/questions/linux-general-1/how-can-i-allow-a-power-user-2-shutdown-linux-boz-from-console-104207/)

poweroff 10-15-2003 09:02 AM

how can i allow a power user 2 shutdown linux boz from console
 
Hi all!

I Need a user who can shutdown box from shell but can`t do some damages in the system.
Thx
Poweroff

born4linux 10-15-2003 09:09 AM

man shutdown

look for shutdown.allow.

also, check for sudo.

porous 10-15-2003 09:16 AM

i am not sure but i believe it should work

you can change the permission of shutdown
so that other users can also shutdown , without elevating their
previlages (and hope you dont need to create a user just for
shutdown :-) ).

ceedeedoos 10-15-2003 09:29 AM

I have a line for that in my sudoers
man sudo
man visudo
man sudoers

and it works smoothly

jpbarto 10-15-2003 01:52 PM

what I do is create a 'shutdown' group, then modify /sbin/shutdown so that its group owner (set to 'shutdown') has executable permission, chmod /sbin/shutdown to suid ('chmod 4550 /sbin/shutdown') and add the desired user to the 'shutdown' group.

but that's just what I do, I could be wrong.

chup 10-15-2003 01:55 PM

heh, i also configured sudo for it, i did it differently though, as i have only the root account and my own.
i just added this to the command alias thingie:
Code:

#Command Alias section
[your_username]            ALL=NOPASSWD:/sbin/shutdown

i just hope i did it the best way....

porous 10-16-2003 06:58 AM

can you explain that a little bit more .....

( i mean i dont understand how it will give the user the previlage to shutdown )

: he doesnt want to give the root passwd to the users to do shutdown....

fatgod 10-16-2003 09:22 AM

Well if you just do what jpbarto said then you can do it right now, easy as, you dont need any additional software or anything. Looks like it would work, jpbarto says it does anyway.


All times are GMT -5. The time now is 01:38 AM.