LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-30-2014, 01:06 AM   #1
anis123
Member
 
Registered: Mar 2012
Posts: 95

Rep: Reputation: Disabled
How to give permissions to users to start and stop only one service


Dear All,

I have cadence server and students access this server from vncviewer

now i want to do that when student access server they only start and stop only cadence server.if i place students in visudo than they have full permissions .


cadences start from /root/cadence .i want to do that user only access this directory
please help me in this regard
 
Old 10-30-2014, 01:14 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Originally Posted by anis123 View Post
now i want to do that when student access server they only start and stop only cadence server.if i place students in visudo than they have full permissions .
Have you read the man page for /etc/sudoers? You can restrict them to executing only a single command rather than completely opening up access. The recommended way is to add permission in /etc/sudoers through group membership (%group entry).
 
Old 10-30-2014, 01:35 AM   #3
anis123
Member
 
Registered: Mar 2012
Posts: 95

Original Poster
Rep: Reputation: Disabled
Thanks for reply sag

can i create group and add students in this group and give access to this group on /root/candence
 
Old 10-30-2014, 11:41 AM   #4
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
If you have administrator permissions on the box then yes. It is recommended to create a group, add users to the group, and then grant that group sudoers permission to start and stop your cadence service.


If you are not the primary administrator on the system then you should follow any policies your admin has in place. They may even do it for you.
 
Old 10-30-2014, 06:01 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Example of sudo for selective commands
 
Old 10-31-2014, 12:16 AM   #6
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Take a look here.
http://www.golinuxhub.com/2013/12/ho...er-to-run.html
 
1 members found this post helpful.
  


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
puppet needs to stop a service, do something, then start the service edwardcode Programming 1 12-03-2012 01:58 PM
Like plugdev, how to give permissions to users for GPHOTO2? frenchn00b Linux - General 0 08-19-2009 03:45 PM
how to give the permissions to gphoto2 for users? frenchn00b Linux - General 0 07-27-2009 06:44 AM
How to give permissions for users....... manikantha Linux - General 1 03-17-2005 04:27 AM
give users permissions to write dragosp Linux - Security 2 09-12-2004 06:53 AM

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

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