LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-02-2003, 04:23 AM   #1
TheShemeta
Member
 
Registered: Jun 2003
Location: Austria
Distribution: Archlinux 0.7 + 2.6.9
Posts: 140

Rep: Reputation: 15
Can't halt or reboot with user account!!!!!!


Hi, guys

Sorry for bothering again, but do you know how can i halt or reboot my system with my user account. i can do that under root, but not with user. it's a lil not comfy.

Thanks a looot!
 
Old 11-02-2003, 05:25 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Most distro's have a gui to configure these things, don't know about Slackware.

You can also use the command line.

Create (check) a file in /etc called shutdown.allow, put the user in there.

Check man shutdown, the ACCESS CONTROL section.
 
Old 11-02-2003, 06:29 AM   #3
TheShemeta
Member
 
Registered: Jun 2003
Location: Austria
Distribution: Archlinux 0.7 + 2.6.9
Posts: 140

Original Poster
Rep: Reputation: 15
Hi,

thanks for the tipp, but i don't have this file. any other ideas?
 
Old 11-02-2003, 06:44 AM   #4
MsMittens
Member
 
Registered: Oct 2003
Location: Canada
Distribution: depends on the mood -- these days.. Slack!
Posts: 44

Rep: Reputation: 15
Take a peak at the man shutdown page. I believe it gives information on how to setup a shutdown.allow page. You would need to create it in Slackware.
 
Old 11-02-2003, 06:55 AM   #5
TheShemeta
Member
 
Registered: Jun 2003
Location: Austria
Distribution: Archlinux 0.7 + 2.6.9
Posts: 140

Original Poster
Rep: Reputation: 15
well i checked the man shutdown & i saw that i miss

/etc/init.d/halt
/etc/init.d/reboot

what should i do next?
 
Old 11-02-2003, 07:10 AM   #6
loonix
Member
 
Registered: Aug 2003
Location: Sydney Australia
Distribution: CentOS/archlinux
Posts: 40

Rep: Reputation: 16
reboot or halt from unprivileged accounts

On my systems I prefer not to follow this method. I just use "su -c reboot" or "su -c halt"
This will ask for the root password and thats it.
No need to do any configuring. simple.
 
Old 11-02-2003, 07:11 AM   #7
MsMittens
Member
 
Registered: Oct 2003
Location: Canada
Distribution: depends on the mood -- these days.. Slack!
Posts: 44

Rep: Reputation: 15
Keep in mind that the man pages are generic for the tool and assume that all *nixes are the same. They are not. For slackware, the halt/shutdown file is found in /etc/rc.d/rc.6.
 
Old 11-02-2003, 08:27 AM   #8
Much
LQ Newbie
 
Registered: Feb 2003
Location: Germany
Distribution: Suse(6.1,7.0), Slackware 9.0
Posts: 2

Rep: Reputation: 0
you just need the permission to run /sbin/shutdown and then set an alias to it.

you can do that with "chmod +s /sbin/shutdown" as root.
And then ad an alias to your ~/.bashrc : alias off=´/sbin/shutdown -h now´
 
Old 11-02-2003, 11:07 AM   #9
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Rep: Reputation: 30
eeeh, i guess I'd consider that somewhat of a security risk having users able to reboot or halt the system. A friend of mine did it a lot as an annoyance to me when i did have it set. Angered me severly ;-P
 
Old 11-02-2003, 11:26 AM   #10
TheShemeta
Member
 
Registered: Jun 2003
Location: Austria
Distribution: Archlinux 0.7 + 2.6.9
Posts: 140

Original Poster
Rep: Reputation: 15
i am stuck! can someone explains it for a newbie? it's really frustrating!
 
Old 11-02-2003, 11:49 AM   #11
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Rep: Reputation: 30
In order to shutdown you can type this in a console...

su -c "shutdown -h now"

to reboot..

su -c "reboot"

In BOTH cases it will ask for the root password. This is your best and easiest bet for now.
 
Old 11-03-2003, 06:28 AM   #12
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
If you are physically at the machine another way is to configure it so that ctrl-alt-del halts the machine.

See this thread
 
Old 11-03-2003, 11:44 AM   #13
DarknessX
Member
 
Registered: Jun 2003
Location: New Jersey, USA
Distribution: Slackware & Debian
Posts: 37

Rep: Reputation: 15
Read the manpage of sudo. It's a secure way to allow users to shutdown/restart the computer -- no permisions to change.

man sudo
 
Old 03-16-2004, 07:28 AM   #14
JGD
Puppy Prime Minister
 
Registered: Mar 2004
Location: SE PA USA
Distribution: Puppy Quirky Xerus Linux
Posts: 8

Rep: Reputation: 0
In slackware:
Using root, in Konqueror (file manager) on advanced permissions menu:
set uid for /sbin/shutdown
and add menu items:
for Halt - power down:
command: /sbin/shutdown -h now
for Reboot - power up:
command: /sbin/shutdown -r now
 
Old 03-16-2004, 11:31 AM   #15
xgreen
Member
 
Registered: Aug 2003
Distribution: Slackware,Ubuntu
Posts: 389

Rep: Reputation: 30
you have to setuid /usr/sbin/halt
as root do:

chmod a+s /usr/sbin/halt
chmod a+s /usr/sbin/reboot

but make sure /usr/sbin path in your $PATH. if doesnt then create symlink from your path to /usr/bin.
 
  


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
Can't run "halt" or "reboot" as user, can somebody help? ro_nicu Slackware 4 11-01-2004 07:57 AM
Can only reboot or halt as root Kernel 2.6.5 Slackware 2 05-20-2004 08:07 AM
Disable reboot/halt/shutdown as normal user carstenbjensen Mandriva 4 09-09-2003 11:42 AM
halt/reboot from a gnome session as normal user tuggy Linux - Software 0 08-28-2003 03:38 PM
halt, shutdown, and reboot HappyDude Linux - Software 29 07-24-2003 02:05 PM

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

All times are GMT -5. The time now is 11:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration