LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-17-2003, 01:09 AM   #1
ssallen
LQ Newbie
 
Registered: May 2003
Posts: 4

Rep: Reputation: 0
making shutdown obey all users


Hey, I am using EvilE with the enlightenment desktop. I used redhat linux 8.0 before and it allowed everyone to shutdown the system. For some reason this distro won't allow non-admins to use the shutdown command. Is there a file I can edit to change this behaviour? I am trying to write a basic script to allow regular users to safely shutdown the system when they are finished using it.

Thanks for any help!

system specs:

kernel 2.4.20
EvilE 0.17
Emachine T1100
cel 1.0 ghz
128 mb sdram
20gb hd
 
Old 06-17-2003, 01:10 AM   #2
Muddy
Member
 
Registered: May 2002
Location: Ohio
Distribution: Mandrake 9.2 Custom Kernel & Mythtv!
Posts: 256

Rep: Reputation: 30
why would you want everyone to be able to shutdown the machine? I think the term security risk should be considered here.
 
Old 06-17-2003, 01:39 AM   #3
ssallen
LQ Newbie
 
Registered: May 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Well, I have two machines hooked up to one power switch. Yes, I know. Anyways, one is a windoze box that is quite fond of crashing. As it has no power switch (strange, huh) they have to switch off the power strip to reboot it. As the linux box is on the same strip they need to be able to shutdown the linux box safely before they cut the power to the windows box. Understanding that I cannot always be there to shutdown the system for them, I would like to write a simple script to shutdown the system easily.

As these are my colleagues in the business I am unconcerned about them stealing anything. Not to mention the fact that they probably couldn't tell you which system, was running what operating system anyways. They word process, they don't care what they do it on.

Thanks again,
 
Old 06-17-2003, 02:05 AM   #4
Muddy
Member
 
Registered: May 2002
Location: Ohio
Distribution: Mandrake 9.2 Custom Kernel & Mythtv!
Posts: 256

Rep: Reputation: 30
well, my understanding of shutdown is you have to be root. I guess the basic fix would be to make them part of root. However I imagine there are many better ways.
 
Old 06-17-2003, 02:07 AM   #5
Muddy
Member
 
Registered: May 2002
Location: Ohio
Distribution: Mandrake 9.2 Custom Kernel & Mythtv!
Posts: 256

Rep: Reputation: 30
I guess if you created a new group, put the people you want in it and change shutdown's group and owner to the new group (add root to it of course) that would do it too.
 
Old 06-17-2003, 06:34 AM   #6
verbal
Member
 
Registered: Jul 2002
Location: New York
Distribution: Red Hat 7.2, SuSE 7.3
Posts: 60

Rep: Reputation: 15
SUDO

Hey there...

Why not look into setting up SUDO access for all users for the single command? This would be a "bit" more secure and could be configured with a single line of text.

Verbal
 
Old 06-17-2003, 01:59 PM   #7
ssallen
LQ Newbie
 
Registered: May 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Hey verbal,

How would I go about that?

Thanks,
 
Old 06-18-2003, 06:21 AM   #8
verbal
Member
 
Registered: Jul 2002
Location: New York
Distribution: Red Hat 7.2, SuSE 7.3
Posts: 60

Rep: Reputation: 15
sudo

hey there...

Not sure what distro you are using but try reading this (applicable to most distro's):

sudo info

read carefully on the info regarding configuration, if your not up on vi, it is a bit of a pain to configure with other editors as vi will validate syntax for you when you try to save; other editors wont and sudo will fail if there is any errors in the config file.

If I am not mistaken, most distros come with sudo pre-installed, you just need to edit the 'sudoers' file.

hope that helped,

Verbal
 
  


Reply



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
Thunderbird does not obey Font setup polemon Linux - Newbie 1 09-20-2005 09:05 AM
Users unable to use shutdown Jskill007 Slackware 3 09-15-2004 02:54 AM
2.6.7 doesn't obey its configuration (!?) ttilt Linux - Software 6 06-18-2004 09:08 AM
Making KDE pause on shutdown finish playing wav file Brian1 Linux - Software 1 03-31-2004 08:36 AM
allow users to shutdown plisken Linux - General 1 02-06-2002 12:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:39 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
Open Source Consulting | Domain Registration