LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Shutdown Permission (https://www.linuxquestions.org/questions/linux-security-4/shutdown-permission-593892/)

Manaburner 10-23-2007 06:54 AM

Shutdown Permission
 
Hi there,

I'd like to know, how I can prevent a normal user from shutting down the computer via GUI, be it Gnome, KDE or sth else.

And how can I prevent root from logging in via the GUI?

Thx

bsdunix 10-23-2007 07:37 AM

You can probably find what you want relating to KDE here:

Chapter 4. Configuring kdm
http://docs.kde.org/stable/en/kdebas...uring-kdm.html

If someone has physical access to your computer, they can just as easily remove the power cord to shutdown the computer.

nomb 10-23-2007 07:41 AM

Well there is a user setting to make it so certian users can't login. Not sure how to tell you to get there from KDE because I use Gnome. But look for it, you'll find it.

Secondly, find out which binary the shutdown button is using. Probably 'shutdown'. Make a group like canshut or something. Add whoever you want to be able to shutdown to that group. Chmod the file to 750 and chown it to root:canshut. Pam might have another way to do this but I'm not sure.

nomb

Manaburner 10-23-2007 07:55 AM

Hi,

what I found in openSuse was an entry in /etc/sysconfig/windowmanager, which controls who can reboot from the GUI. But there must be a way in other distros right?

Thx Mana

nomb 10-24-2007 08:15 AM

All the shutdown buttons in a distro's gui all link to the binary. My suggestion will work in any distro.


All times are GMT -5. The time now is 12:05 AM.