LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-23-2005, 12:34 PM   #1
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
/etc/shutdown.allow being ignored


I want to be able to do

Code:
shutdown -h now
from an unprivileged account (ie as a non-root user). Reading the shutdown man page, it says I can do this by listing the user(s) I want to be permitted to shutdown the machine by putting each username on a separate line in /etc/shutdown.allow, and using the -a argument to shutdown. I have tried this, and it doesn't do anything.

I've got it as follows:

Code:
[root@malvern etc]# ls -al shutdown.allow
-rw-r--r--  1 root root 6 Jul 27 22:54 shutdown.allow
[root@malvern etc]# cat shutdown.allow
david
[root@malvern etc]#
And what happens is:

Code:
[david@malvern ~]$ shutdown -a -h now
shutdown: you must be root to do that!
Can anyone suggest any reason why this shouldn't be working, or have I missed something obvious?
 
Old 08-23-2005, 12:40 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
You may need to make shutdown setuid root, though I am not sure. (chmod 4755 `which shutdown`)
 
Old 08-23-2005, 03:40 PM   #3
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Matir
You may need to make shutdown setuid root, though I am not sure. (chmod 4755 `which shutdown`)
I did contemplate that, but the man page for shutdown says:

Code:
       Shutdown  wasn’t  designed to be run setuid. /etc/shutdown.allow is not
       used to find out who is executing shutdown, it ONLY checks who is  cur-
       rently logged in on (one of the) console(s).
 
Old 08-24-2005, 01:49 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Ah. In that case, are you logged in on a local console when executing this? (Not X, I would think)
 
Old 08-25-2005, 03:38 AM   #5
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Original Poster
Rep: Reputation: 30
I am logged into X on display :0 (i.e. from the box itself) when I do this, executing it in a gnome-terminal.
 
Old 08-25-2005, 07:39 AM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Yes, but shutdown.allow is not checking who is running it, but is checking who is logged in at a console.
 
  


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
Please help on how to save services shutdown or shutdown from the terminal. wambuzz Linux - General 2 03-11-2005 07:38 AM
Linux full shutdown vs. manual shutdown? LQtoto Linux - General 9 01-26-2005 06:21 PM
unable to 'shutdown' from x... need to shutdown using 'halt' guitarnix Linux - Newbie 5 11-24-2003 01:00 AM
konsole shutdown possible? or key combo = shutdown possible? Laptop2250 Linux - Newbie 3 11-16-2003 10:44 AM
shutdown hang during eth0 shutdown kurtisw Linux - Networking 5 10-30-2003 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 08:33 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