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 02-23-2003, 06:58 AM   #1
pixelV
Member
 
Registered: Dec 2002
Distribution: Slackware 8.1
Posts: 123

Rep: Reputation: 15
Cool family access to command poweroff & reboot


I would like to give to my family an access to the commands poweroff & reboot because i think my file system will soon crash.
(my OS - Slackware 8.1)
 
Old 02-23-2003, 07:02 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
create a file called /etc/shutdown.allow and add the relevant usernames
 
Old 02-23-2003, 07:14 AM   #3
pixelV
Member
 
Registered: Dec 2002
Distribution: Slackware 8.1
Posts: 123

Original Poster
Rep: Reputation: 15
???

it doesn't work !
 
Old 02-23-2003, 08:19 AM   #4
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Slackware64-current multilib
Posts: 235

Rep: Reputation: 55
I have an approach that I use with point-and-click type users in our lab. Just have the machine start up in runlevel 4 (/etc/inittab). KDM (The KDE Display Manager) has very pretty buttons and drop down menus for rebooting and shutting down.

Last edited by fskmh; 02-23-2003 at 08:20 AM.
 
Old 02-23-2003, 09:49 AM   #5
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
Re: ???

Quote:
Originally posted by pixelV
it doesn't work !
what syntax did you try?

/etc/shutdown.allow is one user per line
but, you have to add the '-a' option to your shutdown command (atleast that's what the manpage says.)
 
Old 02-23-2003, 01:45 PM   #6
pixelV
Member
 
Registered: Dec 2002
Distribution: Slackware 8.1
Posts: 123

Original Poster
Rep: Reputation: 15
i try to type shutdown, but bash show: command not found

???
 
Old 02-23-2003, 02:33 PM   #7
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
Try

/sbin/shutdown -a now

As a user listed in the /etc/shutdown.allow file.
 
Old 02-23-2003, 02:38 PM   #8
pixelV
Member
 
Registered: Dec 2002
Distribution: Slackware 8.1
Posts: 123

Original Poster
Rep: Reputation: 15
# /sbin/shutdown -a
you must be root to do that
 
Old 02-23-2003, 03:31 PM   #9
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
Well I tried to set it up and couldn't get it to work. It also appears that it would only restrict the use of Ctrl-Alt-Del from the console through init if the file is present. Otherwise it is the same as regular, any user at the physical console keyboard can press Ctrl-Alt-Del to shutdown the system.

However, if you wish to allow the shutdown command for ALL users then you might want to consider the setuid root the shutdown command.

chmod 7755 /sbin/shutdown

Then any user could type "/sbin/shutdown -ah now" at a prompt and the system would shutdown and halt.
 
Old 02-23-2003, 03:47 PM   #10
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 660

Rep: Reputation: 30
I've been using the idea of the GDM/XDM/KDM with the GUI in runlevel 4. I do like most of the GDM screens anyways and I thought i might as well, that way it can sit at a nice login with a nice theme and I can shutdown/reboot whenever since the computer is in a secure location.
 
Old 02-24-2003, 05:58 AM   #11
pixelV
Member
 
Registered: Dec 2002
Distribution: Slackware 8.1
Posts: 123

Original Poster
Rep: Reputation: 15
Talking ### ctrl+alt+del ###

now my users can reboot computer by pressing ctrl+alt+del keys.

Thanks
 
Old 02-27-2003, 03:11 PM   #12
otbibb
Member
 
Registered: Oct 2002
Distribution: Slackware 8.1
Posts: 33

Rep: Reputation: 15
If they want to turn it off completely, it is safe to cut the power when the console message says "rebooting." I have myself in the sudoers file, so I can "sudo /sbin/halt" which works great. You may not want to give your family actual root privileges, though :-)

If you aren't going to gdm or kdm, as an earlier poster said, ctrl-alt-del and switching off the power at the right moment might be the easiest way. (Again, KDM or GDM would be the *easiest* way. They were built with this kind of situation in mind.)

BB
 
Old 02-27-2003, 03:18 PM   #13
JoooN
Member
 
Registered: Feb 2003
Distribution: Slackware 9.0
Posts: 46

Rep: Reputation: 15
hmm I reinstalled Slack and then the current packages after that and I havn't done anything like this and I can reboot and shutdown as a common user. I couldn't do this before but now I can?! It's good but I don't know now it happend.
 
  


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
reboot/poweroff how? demmylls Linux - General 2 08-13-2009 09:52 AM
reboot vs poweroff??? bigdog0007 Linux - Newbie 4 09-16-2005 02:48 AM
enabling poweroff/reboot for user YBA^[x] Slackware 11 12-13-2004 02:04 AM
Giving Specific users access to the reboot command shassouneh Linux - Security 15 03-24-2004 05:10 PM
SuSE 8.2 Will Not Poweroff, Shutdown, Reboot, Halt... whiskeypriest Linux - Newbie 4 09-18-2003 09:29 AM


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