LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-10-2009, 03:41 AM   #1
roobanbe
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Rep: Reputation: 0
i want to give access


hi friends,

i want to give access to an user account(other than root) in the linux rethat server to restart a service like (apache). how can i do it

regards,
P. Rooban
 
Old 09-10-2009, 04:18 AM   #2
ak99505
Member
 
Registered: Feb 2005
Location: Missouri
Distribution: Archlinux
Posts: 85

Rep: Reputation: 17
sudo is the command you're looking for
you can give users our groups of users permission to run select commands as root or as another user
 
Old 09-10-2009, 04:42 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by roobanbe View Post
hi friends,

i want to give access to an user account(other than root) in the linux rethat server to restart a service like (apache). how can i do it

regards,
P. Rooban

Here you can find how to assign sudo rights.
 
Old 09-10-2009, 04:51 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
An entry like this one (goes in /etc/sudoers file) gives specific user(s) the permissions to stop/start/restart apache:

# webadmin users (all the users that may execute the WEBADMIN_CMDS)
User_Alias WEB_USERS = user1, user2

# webadmin commands (just one example command)
Cmnd_Alias WEBADMIN_CMDS = /etc/init.d/httpd

# Start/stop/restart apache
WEB_USERS ALL = NOPASSWD: WEBADMIN_CMDS


After that is set up you can do the following:

sudo /etc/init.d/httpd restart as normal user that is defined in WEB_USERS.

Hope this helps.
 
  


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
give access to users Hern_28 Slackware 2 03-21-2007 02:29 PM
give user access to mount xbriank Fedora 2 02-15-2005 06:44 PM
Give Access extremebfn Linux - Networking 6 08-31-2004 03:27 AM
give user SU to access evrything? OverrRyde Mandriva 8 08-05-2004 01:58 PM
How to give access... zolo44 Linux - Newbie 4 01-18-2003 04:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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