LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 01-07-2004, 11:27 AM   #1
mrde50garfield
Member
 
Registered: Dec 2003
Distribution: Mandrake, Red Hat, Gentoo, Fedora, ClusterKnoppix, Scyld Beowulf
Posts: 52

Rep: Reputation: 15
Allowing all users to use 'shutdown' command


What modifications must I make to my Mandrake 9.1 server to allow all users the ability to run the 'shutdown' command?

The security level is set to 'standard'.

At this time, only root can execute this command.
 
Old 01-07-2004, 03:01 PM   #2
colnago
Member
 
Registered: Nov 2003
Location: Canada
Distribution: ArchLinux
Posts: 324

Rep: Reputation: 30
shutdown is in /sbin, I think it is just not in the users path. The command is world executable, but most users do not have /sbin in their path. You could either just add /sbin to their path or put in an alias for shutdown to /sbin/shutdown for them.
 
Old 01-07-2004, 04:07 PM   #3
Gary987
Member
 
Registered: Oct 2003
Distribution: Gentoo, Mint, Ubuntu, Vector
Posts: 174

Rep: Reputation: 17
Why not just use halt?


Gary
 
Old 01-07-2004, 11:13 PM   #4
ac_dispatcher
Member
 
Registered: Aug 2003
Location: Ohio, USA
Distribution: Kubuntu
Posts: 60

Rep: Reputation: 15
What about the sudo command? Not at home right now but you can give users access to su commands via sudo. Can't remember the exact name of the file but its in the /etc directory. I think it /etc/sudoers or something like that. I edited mine manually. you can as root -

#/usr/sbin/visudo


The syntax of the sudo line is:

user machine=(effective user) command

first column specifies the sudo user
next defines the hosts in which entry is valid
the 3rd ( ) column is the effective user that may run the commands, this allows to execute commands other than root.
finally the last is the commands given or allowed by sudo command

Some examples:

For example:

joe home.net=(ALL) ALL
-joe has root commands on home.net server

joe home.net=(mailman) ALL
-joe has mailman commands on home.net server

joe home.net=(bind) /usr/sbin/rndc,/usr/sbin/named
-joe has bind and can run above commands (mdc and named)

You could:

joe MDKserver=(ALL) /sbin/shutdown

replace joe with your user name and MDKserver with the server name.

OK to be honest its late and I may have made a mistake somewhere here. If I did please correct me

or
$sudo --help
 
Old 01-08-2004, 03:51 AM   #5
ac_dispatcher
Member
 
Registered: Aug 2003
Location: Ohio, USA
Distribution: Kubuntu
Posts: 60

Rep: Reputation: 15
Try this also:
http://www.patoche.org/LTT/configuration/00000059.html
 
Old 01-08-2004, 09:58 AM   #6
ryeman
Member
 
Registered: Jan 2004
Location: Gainesville, GA
Distribution: Ubuntu
Posts: 118

Rep: Reputation: 15
If you want to 'shutdown' your computer, use halt . It works as root or user.
 
  


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
Allowing users to shutdown - Slack 10.1 amwink Slackware 31 08-22-2006 11:59 AM
How can I make the "shutdown" command available for all users? LinuxSeeker Linux - General 7 06-01-2005 05:40 PM
Allowing users to shutdown the system LinuxSeeker Linux - General 3 11-11-2004 09:18 AM
Allowing *some* users to mount ugenn Linux - General 8 03-01-2004 10:48 PM
allowing non-root users to mount drives and shutdown rlpt Slackware 3 09-21-2002 06:35 PM

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

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