Jump to content

userdrake allowing user shutdown command w/o root


Guest chansel
 Share

Recommended Posts

Guest chansel

Hi all,

for a server running mdk 10.1 I would like to allow a user, who doesnt have root privileges, to run the shutdown command, and some others (preferibly with specific parameters) I.e. I would like a user to allow the following commands

 

shutdown -r now

apachectl restart

mysql restart

 

without giving him/her the right to run other commands.

 

I could also imagine that, once the user logs in, a simple script in bash gives him these choices and not more (but am not sure how to approach this)

 

I usually dont do Linux administration but this time I have to.

 

Hope someone can help

 

Moved from Networking by Qchem

Link to comment
Share on other sites

Never before did I see such a perfectly tailored usage example for sudo. sudo is a tool to give to chosen users the right to execute chosen commands, with chosen parameters, using chosen identities.

 

First set the EDITOR and VISUAL environment variables to the path of a text editor you're comfortable with (pico, vi, emacs...)

 

In a terminal window, open "man sudo", and in another window, run "visudo", which will in turn open your text editor.

 

Yves.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...