LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-21-2013, 01:08 PM   #1
elkhedewy
LQ Newbie
 
Registered: May 2013
Posts: 6

Rep: Reputation: Disabled
ssh account to restart 1 service ?


Hello,

I created account on my linux machine for one of my clients, and allowed him to restart red5 service

i did that using visudo by adding
username ALL = /etc/init.d/red5


but when he makes ls /var/ or any other dir, he is allowed to see the content of /var.

The question is how to restrict him from going outside his homedir and still can restart red5 service

Thank you
 
Old 05-21-2013, 01:25 PM   #2
elkhedewy
LQ Newbie
 
Registered: May 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
One more thing could help me.

I need to know how to make this user once he logged in the ssh execute automatically /etc/init.d/red5 restart and then foce him to logout from ssh.

which means that everytime he needs to restart red5 which is my main point, he just login to Terminal then write his username and password and thats it .

this is to make him not able to run other commands except restarting his red5 service any time he needs.

But how could i finish that !

Last edited by elkhedewy; 05-21-2013 at 01:28 PM.
 
Old 05-21-2013, 02:24 PM   #3
elkhedewy
LQ Newbie
 
Registered: May 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Well,

i finished that by the following,

First created account

Then added this line at /etc/sudoers
username ALL = /etc/init.d/"service name"

Then
ln -s /bin/bash /bin/rbash

vim /etc/passwd
changed:
username:x:32012:32013::/home/username:/bin/bash

to
username:x:32012:32013::/home/username:/bin/rbash


Thanks
 
  


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
[SOLVED] SSH - How can I only allow a key pair login for my user account not root account? shanekelly Linux - Security 5 01-25-2013 09:45 AM
Cron service and oracle service stopped unexpectedly. Can't restart oracle. camron Linux - Newbie 6 06-10-2010 06:00 PM
ssh local account / ldap account Poil Linux - Security 5 02-26-2010 01:04 AM
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 11:24 AM
Can't SSH until restart service Da Puff Mandriva 4 09-14-2005 08:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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