LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 03-03-2010, 10:23 AM   #1
Peter Cattaneo
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
Prevent a non-root user from shutting down, rebooting or suspend the system


I'm using Gnome and I'd like to still have the ability to reboot/shutdown from one particular account as well as root. How would I modify the chmod command to add this ability?

Also, I have a few users who just will hold the power button in to shutdown the machine. How can I keep them from doing this?

Thanks

// Pruned from the vintage 2007 Prevent a non-root user from shutting down, rebooting or suspend the system thread. Please create new threads instead of resurrecting ancient ones.

Last edited by unSpawn; 03-03-2010 at 11:19 AM. Reason: //Prune 'n graft note
 
Old 03-03-2010, 10:50 AM   #2
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: PC-BSD / FreeBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 438

Rep: Reputation: 57
Quote:
Originally Posted by Peter Cattaneo View Post
I'm using Gnome and I'd like to still have the ability to reboot/shutdown from one particular account as well as root. How would I modify the chmod command to add this ability?

Also, I have a few users who just will hold the power button in to shutdown the machine. How can I keep them from doing this?

Thanks
I believe that one is built in to the BIOS, but you might want to look into putting a cover over the power button.

I assume this box is someplace where users have physical access to it? Do they need this level of access to it? Perhaps you could put it into a locking desktop kiosk.
 
Old 03-03-2010, 01:19 PM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,033

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
I'm using Gnome and I'd like to still have the ability to reboot/shutdown from one particular account as well as root. How would I modify the chmod command to add this ability?
Read up on the use of sudo which will allow certain users (you define them) to use some (and you get to choose just which) commands that need to be run as root.

Or, if it is just reboot/shutdown, you could create a new group called reboot then you could add your special user to the group reboot and then set the permissions for reboot shutdown and halt to 750 and then alter the owner:group of those executables to root:reboot
That way, those commands can only be run by root, or a member of the group reboot

The power button is more complicated. Basically, if users can get to the power button, or the wall socket, they can do as they like with your PC (Eg boot to a live CD). You might have set your CMOS not to allow this, but if they can access the hardware, they can remove the CMOS battery and then make it boot without a password.

That's why banks, and others, spend a lot of money to keep their computers in "secure" buildings.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent a non-root user from shutting down, rebooting or suspend the system m2azer Linux - Security 7 10-30-2007 09:15 AM
How to prevent root user from logging into ssh linuxjamil Linux - Server 2 10-08-2007 07:10 PM
FTP Server: Prevent user from getting out of their root directory Swakoo Linux - General 4 03-02-2007 02:42 AM
shutting down and rebooting from logout screen doralsoral Linux - Software 2 06-08-2005 02:07 PM
X Display problems for user (and not root) after suspend mode Rukhin Linux - Laptop and Netbook 3 03-10-2004 09:31 PM


All times are GMT -5. The time now is 07:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration