LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 02: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, 02: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 02:28 PM.
 
Old 05-21-2013, 03: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:45 AM
Cron service and oracle service stopped unexpectedly. Can't restart oracle. camron Linux - Newbie 6 06-10-2010 07:00 PM
ssh local account / ldap account Poil Linux - Security 5 02-26-2010 02:04 AM
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 12:24 PM
Can't SSH until restart service Da Puff Mandriva 4 09-14-2005 09:51 PM


All times are GMT -5. The time now is 06:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration