LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-20-2009, 10:47 AM   #1
farhanzahidi
LQ Newbie
 
Registered: Jun 2009
Location: Delhi
Distribution: CentOS
Posts: 5

Rep: Reputation: 0
Smile User access restriction in centOS 5 to run single script only.


Hi there,

Can anyone help in setting a user with a no privilege to run /bin /sbin and /usr/sbin commands.

I am able to restrict the directory navigation using /bin/rbash shell, however not finding the way to restrict the user to execute the system command like rm -rf, netstat, top etc

the user needs to be able to login to shell via SSH and execute one script like /home/frank/test.pl which is 755.



any help is appreciated!!!

thanks,
kfz
 
Old 06-20-2009, 11:38 AM   #2
jhcaiced
Member
 
Registered: Mar 2009
Distribution: CentOS - Ubuntu - Debian
Posts: 83

Rep: Reputation: 27
Hi,

Some ideas about doing that:
- You can modify the user's shell to test.pl so that script is
executed when the user log in and the user is logged out
after the script is done.
- If the user log in by ssh, you can configure a key based authentication
which allows to run only the test.pl script.
- You can setup a chroot for that user with just the test.pl script.
 
  


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
Restrict a user to only have access to ONE single folder. colltek Linux - Newbie 4 01-30-2009 10:41 AM
Grant normal user to run certain script with root access cdestiny Linux - Server 4 09-30-2008 02:42 AM
need help on creating user access restriction pmcom Ubuntu 0 10-08-2007 09:23 PM
I can't run Firefox from my single user(only from a super user) nightrider Linux - Newbie 14 10-24-2006 08:35 PM
How do I enable remote access for single-user mode? wired Linux - Newbie 1 02-27-2006 04:37 PM

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

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