LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 09-16-2006, 11:29 PM   #1
pxumsgdxpcvjm
Member
 
Registered: Aug 2005
Posts: 235

Rep: Reputation: 30
Question Shutdown Issues


I've just installed Slackware 9.1 a few days ago and I'm really enjoying it. Nice to see a distro that isn't filled with bloat. It's also interesting to learn how to setup Linux without using X.

Anyway I have a few questions dealing with shutting down.

My first one is that when I hit the shutdown button on my computer, Slackware powers off without running the rc.6 script (halt & reboot). This isn't a computer problem as Windows 98 could do this fine. How can I prevent this and shutdown cleanly?

My next question is that I wish to allow any local users to shutdown or reboot the computer. I know that I can edit the sudoers file to allow certain users or groups to shutdown but isn't what I'm wish for it to do. If someone logs in as guest on a remote computer and tries to shutdown, they shouldn't be allowed. However if guest is logged in locally, they should. As far as I know, the only way to check is a user is logged in remotely is to check their terminal name (ttyS?). How can I get sudoers to check this?

Big thanks to anybody who replies.
 
Old 09-17-2006, 12:51 PM   #2
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 635

Rep: Reputation: 35
Hi,

First of all, I strongly recommend you to try a slightly more recent version of Slackware than 9.1. 11.0 is just around the corner, and in the meantime, 10.2 is rock solid. A lot of changes have gone into Slackware since 9.1, and it's quite likely that the issue you are describing is fixed there.

As for your shutdown issue, try creating a file called /etc/shutdown.allow and update the inittab file to ensure that the shutdown program is called with "-a" argument.
shutdown.allow has one username per line, and shutdown compares this list to the list of locally active tty's to prevent remote user shutdowns.

Note - haven't tested this myself, so you might want to do a couple of dry-runs before letting your users have a go

-Y1
 
Old 09-19-2006, 02:29 PM   #3
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,173

Rep: Reputation: 47
For the first issue try this, from Tuxmobile. I used it when I installed 9.1 on my laptop, and later for my desktop also. Of course, make sure ACPI is actually running before bothering with this.

Quote:
This system handles ACPI a bit weird, and generates a forward-slash character instead of a space between the event strings in /proc/acpi/event which the acpid daemon watches. No need to fret, as a quick tweak of the ACPI handler script can get it so you can have the system shutdown properly (init 0) upon just pressing the power button as its supposed to. All you have to do is edit the /etc/acpi/acpi_handler.sh script with your favorite text editor.

Change the string button) below $1 to read button/power) and the string power) below $2 to read PWRF) and you should be all set upon restarting acpid. You can also add a custom event above the *) line to make something happen upon closing the lid... its just: button/lid) and LID) instead.
and for the second part I prefer using sudo.
 
Old 09-19-2006, 05:49 PM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,476

Rep: Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532
Quote:
My next question is that I wish to allow any local users to shutdown or reboot the computer.
Yalla-One mentioned /etc/shutdown.allow, but perhaps the following also might help:

Automagically Running Programs During Startup and Shutdown

Adding a Shutdown Command to inittab
 
  


Reply

Tags
shutdown


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
Mandrake 10.1 shutdown issues. [CBLA]Green Mandriva 3 02-21-2006 12:35 PM
Shutdown issues... Superion Linux - Newbie 8 09-15-2005 04:05 AM
Reboot,shutdown,logout issues in 10.1 Volt Slackware - Installation 3 08-12-2005 11:34 PM
Persistent shutdown issues corbis_demon Linux - Newbie 3 06-30-2004 06:04 PM
Shutdown and rebooting issues... Linux~Powered Linux - Software 1 02-01-2004 10:21 PM


All times are GMT -5. The time now is 01:50 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration