LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-14-2010, 09:30 PM   #1
Jerry Mcguire
Member
 
Registered: Jul 2009
Location: Hong Kong SAR
Distribution: RedHat, Fedora
Posts: 201

Rep: Reputation: 31
halt, reboot, poweroff, everybody!


Is there a way to limit 'halt' 'reboot' 'poweroff' commands only to the superuser 'root'?

Thanks.
 
Old 10-14-2010, 09:35 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Don't grant sudo root access to other people?

Or use sudo as it was intended, instead of a blanket ALL=(ALL) ALL?
 
Old 10-14-2010, 09:41 PM   #3
Jerry Mcguire
Member
 
Registered: Jul 2009
Location: Hong Kong SAR
Distribution: RedHat, Fedora
Posts: 201

Original Poster
Rep: Reputation: 31
No no..

It is, anyone including non-sudoers who has logged in can type these commands in a tty or pts, and the system does it!

I'm on Red Hat 5 and Fedora 13.
 
Old 10-14-2010, 11:37 PM   #4
Jerry Mcguire
Member
 
Registered: Jul 2009
Location: Hong Kong SAR
Distribution: RedHat, Fedora
Posts: 201

Original Poster
Rep: Reputation: 31
man halt:
Code:
...
DIAGNOSTICS
       If  you’re  not  the  superuser,  you will get the message ‘must be superuser’.
Users logged in locally on the console can call halt,   reboot, and poweroff without
supplying the root password, due to pam_console (8).
I have no idea why pam_console is to be responsible or how to stop local users from 'reboot'ing... Anyone?
 
Old 10-18-2010, 01:06 AM   #5
Jerry Mcguire
Member
 
Registered: Jul 2009
Location: Hong Kong SAR
Distribution: RedHat, Fedora
Posts: 201

Original Poster
Rep: Reputation: 31
anyone? please.
 
Old 10-18-2010, 09:15 AM   #6
zhaozhou
LQ Newbie
 
Registered: Oct 2009
Location: Sweden
Distribution: Gentoo
Posts: 23

Rep: Reputation: 1
I wonder if this is a Red Hat issue. On my Gentoo installation, I've got no pam_console, halt is root only and the man page says:
Code:
DIAGNOSTICS
       If you're not the superuser, you will get the message `must be superuser'.
But I will try to help as best as I can.
In your /etc/pam.d you should have configurations concerning pam, and specifically, pam_console. Take a peep in there and paste any file you think has something to do with your issue here.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"shutdown" and "halt" symlinks: poweroff, reboot. sud_crow Linux From Scratch 11 10-17-2006 11:03 PM
differentiate poweroff from halt ric Slackware 6 07-25-2006 07:04 PM
Halt, but no poweroff frzburn Slackware 4 02-19-2004 06:58 PM
SuSE 8.2 Will Not Poweroff, Shutdown, Reboot, Halt... whiskeypriest Linux - Newbie 4 09-18-2003 09:29 AM
halt/poweroff quirks saturn_vk Linux - Hardware 3 03-27-2003 02:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:49 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration