LinuxQuestions.org
Review your favorite Linux distribution.
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 03-03-2014, 11:44 AM   #1
Highjo
Member
 
Registered: Jan 2007
Posts: 36

Rep: Reputation: 0
Question I can't make partial sudo account work on ubuntu server 10.04


The title might not be explanatory enough but I couldn't find any better way to formulate it. I will be running a server for office use. It will host applications on tomcat. 2 differents people would be deploying the application they are working on (office policy, all developers should be familiar with it).

I know there is ACL module at HDD level but I think it would be an overkill to do that for this purpose. Beside its usage is not so clear to me as I would want to use it in a a way where I could list allowed actions like listed below , allowed for an user or group as opposed to listing the users/groups who are allowed for a particular resource/script etc.

I would like to create a group which would be giving a particular set of privileges such as:

create a folder in /opt/tomcat*/webapps * there could be different instances
start/stop/restart a particular tomcat servive example service tomcat-1 start
start/stop/reload/restart apache2 for reverse proxy purpose
edit /etc/apache2/sites-available for reverse proxy purpose
activate/deactivate sites using a2ensite or a2dissite


I created the users user1, user2, user3 and added them to the group deployers. All tomcat instances created with tomcat-user are inside /opt/tomcat7/ so I changed the user ownership of the folder to tomcat7 and the group owner ship to deployers and chmod to 775. I have made a copy of /etc/init.d/tomcat7 to suit each of my instances and added them to update-rc.d. with visudo I have created DEPLOYERS Cmnd_Alias and configured it as shown below:

Cmnd_Alias DEPLOYERS= /etc/init.d/tomcat_instance_1,/etc/init.d/tomcat_instance_2,/sbin/sh,/usr/bin/service
%deployers ALL=(ALL) DEPLOYERS

I have logged in with user1 credentials and I still can't run /etc/init.d/tomcat_instance_1 start because it says "You need root privileges ...".

Can anyone help with what I am not doing right?
 
Old 03-03-2014, 12:57 PM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
still can't run /etc/init.d/tomcat_instance_1 start because it says "You need root privileges ...".
Did you do
Code:
sudo -l
sudo /etc/init.d/tomcat_instance_1 start
and if so what happened?

Last edited by linosaurusroot; 03-03-2014 at 12:59 PM.
 
1 members found this post helpful.
Old 03-03-2014, 01:00 PM   #3
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Allowing /usr/bin/service enables much more than the few services you seem to intend.
 
Old 03-04-2014, 09:12 AM   #4
Highjo
Member
 
Registered: Jan 2007
Posts: 36

Original Poster
Rep: Reputation: 0
Hello
Thanks for pointing me to the right direction. it working with sudo command. I added the /usr/bin/service because I wanted them to be able to use service tomcat_instance_1 start.

Thanks for pointing that out.
 
  


Reply

Tags
partial, privileges, ubuntu server



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
i'm no longer sudo and can't login in my account on Ubuntu 12.10 zokka66 Linux - Software 3 06-09-2013 06:42 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM
How do I make openal work with php on ubuntu server 9.04? MadMusician_uk Ubuntu 0 11-18-2009 06:07 PM
How can I make GTK work on my Ubuntu Server? bollweevil Linux - Software 2 03-29-2009 01:09 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM

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

All times are GMT -5. The time now is 08:14 AM.

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