LinuxQuestions.org
Help answer threads with 0 replies.
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-27-2012, 11:43 PM   #1
benjam1nrk
LQ Newbie
 
Registered: Mar 2010
Distribution: CentOS
Posts: 24

Rep: Reputation: 1
Question Shell Script in rbash


I have an account configured to utilize rbash as its shell.

I am able to successfully create links to binaries that can be executed by the restricted shell user without problem.

However, how do I go about providing the user with the ability to execute shell scripts from his command line?

For example, I have the bash script:
Code:
#!/bin/bash
/bin/ls
echo "I am finished"
Is it possible to run this script by the restricted shell user without getting the error "-rbash: /bin/ls: restricted: cannot specify `/' in command names"?

I was somewhat under the assumption that the script would execute in the unrestricted bash shell.
 
Old 06-28-2012, 02:56 AM   #2
kinneyd
LQ Newbie
 
Registered: Oct 2011
Posts: 21

Rep: Reputation: Disabled
Instead of calling /bin/ls , try just calling ls. The restricted shell doesn't want you to use the "/" character in your command names. I believe the restricted shell is going to limit you to commands found in your path.
 
Old 06-30-2012, 11:03 AM   #3
benjam1nrk
LQ Newbie
 
Registered: Mar 2010
Distribution: CentOS
Posts: 24

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by kinneyd View Post
Instead of calling /bin/ls , try just calling ls. The restricted shell doesn't want you to use the "/" character in your command names. I believe the restricted shell is going to limit you to commands found in your path.
Thank you, I believe this is the case.
 
  


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
How to pass command line arguments from one shell script to another shell script VijayaRaghavanLakshman Linux - Newbie 5 01-20-2012 10:12 PM
[SOLVED] Needed to be $HOME/.bashrc disabled when user shell is 'rbash' (restricted shell) mgumbau Linux - General 2 06-16-2011 07:17 AM
Executing a Shell script with 654 permissions inside another shell script. changusee2k Linux - Newbie 2 06-07-2011 08:58 PM
need more restricted shell then rbash redss Linux - General 3 01-26-2006 10:55 AM


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