LinuxQuestions.org
Visit Jeremy's Blog.
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 06-16-2002, 10:05 PM   #1
ethanchic
Member
 
Registered: May 2002
Location: CDO, Ph
Distribution: slackware 9.0, LFS-3.3, mandrake 9.2
Posts: 65

Rep: Reputation: 15
how to allow a not root user to shutdown


I am having a problem on how to allow a not root user to shutdown the computer.
I have tried to make an /etc/shutdown.allow config and add one of my user and editted the /etc/inittab ca::ctrlaltdel:/sbin/shutdown -a -t5 -rf now

Last edited by ethanchic; 06-16-2002 at 10:07 PM.
 
Old 06-17-2002, 12:34 AM   #2
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Rep: Reputation: 30
try changing the permission of the shutdown command
 
Old 06-17-2002, 12:35 AM   #3
sakeeb
Member
 
Registered: Apr 2002
Posts: 270

Rep: Reputation: 31
try

halt
poweroff
 
Old 06-17-2002, 01:00 AM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
you need to put suid bit
chmod 4755 /sbin/shutdown
 
Old 06-17-2002, 07:56 AM   #5
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
Quote:
...and editted the /etc/inittab ca::ctrlaltdel:/sbin/shutdown -a -t5 -rf now
Comment out the existing inittab entry (with # in first position of the line) and add a new entry:

ca::ctrlaltdel:/sbin/shutdown -h now

That will allow all to halt the system, in a graceful manner, with the ctrl/alt/del keyin.

Never use "halt" or "poweroff", unless nothing else works. These two commands work, but there's no guarantee what they will do to a running system.
 
Old 06-17-2002, 08:32 AM   #6
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
Hmm, usually any distribution comes with the default set so that any user can shutdown the computer, it's sort of weird yours is not working unless you've modefied it yourself before...

zLinuxz
 
Old 06-17-2002, 08:37 AM   #7
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
Sometimes the "shutdown" is put out there with the "-r" option as default. Of course, that results in a reboot after a graceful shutdown. That's the way it's been on my Mandrake installs, anyway !!
 
Old 06-17-2002, 08:48 AM   #8
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
ooo, kewl. I guess that probaly does depend on the distribution, since redhat, if your bios is capable of, can actually powerdown the computer not just halt it which is nice, don't have to wait around for the halt word to appear and then to press the power button, hehhe.
 
Old 06-17-2002, 04:20 PM   #9
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
Yeah that is good. Mandrake and my lappie power down completely with ctrl/alt/del, now that I have it do a "shutdown -h" in /etc/inittab !!

Last edited by jglen490; 06-17-2002 at 04:21 PM.
 
Old 06-18-2002, 05:08 AM   #10
ethanchic
Member
 
Registered: May 2002
Location: CDO, Ph
Distribution: slackware 9.0, LFS-3.3, mandrake 9.2
Posts: 65

Original Poster
Rep: Reputation: 15
thank's for your replies guys it help me a lot
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
shutdown with a not root user krusty_lab AIX 2 10-18-2005 06:07 PM
Root User freezes on logout or shutdown grizzlyaka Linux - Laptop and Netbook 2 04-27-2005 08:20 AM
I want to grant 'shutdown' previlege to a non-root user to do directly from console jagadee76 Linux - General 6 12-29-2004 03:16 AM
Can't shutdown as any user but root? JustinCoyan Slackware 4 06-10-2004 01:05 PM
Shutdown Gnome Menu for non-root user? schmmd Linux - General 4 03-10-2004 09:49 PM

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

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