LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-18-2005, 04:26 PM   #1
mnemonic
LQ Newbie
 
Registered: Jun 2002
Distribution: Gentoo
Posts: 8

Rep: Reputation: 0
Can't "shutdown -a -r now" as a normal user, though shutdown.allow exists


My /etc/shutdown.allow file lists my username "james." When logged in as "james" using "shutdown -a now" gives me the "you must be root to do that" and the Usage info. I'm using Gentoo with kernel 2.6. How can I allow normal users to shutdown and reboot the computer?

Last edited by mnemonic; 07-19-2005 at 09:00 AM.
 
Old 07-19-2005, 08:55 AM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
I never thought there was something like shutdown.allow, that's nice to know

Usually on my workstation (where I am the only user) I use the setuid trick to allow user to halt/reboot ( chmod 4755 /sbin/halt and chmod 4755 /sbin/reboot ).
On a multiuser computer, my idea would be to use "sudo" to allow certain users root power when they call shutdown and/or halt and/or reboot. Refer to sudo documentation (man sudo, man /etc/sudoers) if you want info about this.
 
Old 07-19-2005, 09:00 AM   #3
mnemonic
LQ Newbie
 
Registered: Jun 2002
Distribution: Gentoo
Posts: 8

Original Poster
Rep: Reputation: 0
shutdown.allow is mentioned the shutdown man page. Certainly there is a way of making this feature work properly?
 
Old 07-19-2005, 09:22 AM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I just looked at man shutdown, and one way to read the part about /etc/shutdown.allow would be that it only applies to processing of CTL-ALT-DEL.

What happens when you do a CTL-ALT-DEL (After adding the "-a" in /etc/inittab)?
 
Old 07-19-2005, 09:27 AM   #5
mnemonic
LQ Newbie
 
Registered: Jun 2002
Distribution: Gentoo
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by PTrenholme
I just looked at man shutdown, and one way to read the part about /etc/shutdown.allow would be that it only applies to processing of CTL-ALT-DEL.

What happens when you do a CTL-ALT-DEL (After adding the "-a" in /etc/inittab)?
Ctrl-alt-del works as a normal user. EDIT: If it applies only to ctrl-alt-del, then why does shutdown have the -a option? From the man page: "-a Use /etc/shutdown.allow."

Last edited by mnemonic; 07-19-2005 at 09:32 AM.
 
Old 08-15-2005, 06:49 PM   #6
dasbooter
Member
 
Registered: Mar 2005
Posts: 122

Rep: Reputation: 15
I agree that is a good questions why have -a option if you arent trying to do it from the console?
Just googled up this thread with the same question in mind
 
  


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
"shutdown" and "halt" symlinks: poweroff, reboot. sud_crow Linux From Scratch 11 10-17-2006 11:03 PM
normal user want to perform "init 6" by using " sudo acbenny Linux - General 3 08-08-2004 07:41 AM
grant user "shutdown -h now" mcshen Linux - Newbie 3 01-11-2004 01:30 PM
can normal user do shutdown? TheOneAndOnlySM Slackware 12 12-17-2003 11:10 PM
Removing "shutdown" and "reboot" in logout window nearfar Red Hat 1 10-07-2003 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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