LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Restricted shell (https://www.linuxquestions.org/questions/linux-software-2/restricted-shell-42547/)

Rocket01 01-23-2003 05:56 PM

Restricted shell
 
Hello

I am trying to set up a restricted shell for FTP and ssh in red hat linux ver. 7.1 can any one help me... Thanks

MasterC 01-23-2003 06:47 PM

How restricted? Have you ever heard about rbash? Do a search on this site about it, it worked great for my needs.

Cool

Soma 01-23-2003 07:10 PM

Re: Restricted shell
 
Quote:

Originally posted by Rocket01
Hello

I am trying to set up a restricted shell for FTP and ssh in red hat linux ver. 7.1 can any one help me... Thanks

If you don't have rbash in /bin try the following:

1. create a file in /bin called rbash with the following contents;
#!/bin/bash
/bin/bash --restricted

2. chmod the file to 755

3. add /bin/rbash to /etc/shells

4. change a users shell to /bin/rbash (usermod -s /bin/rbash user) and test it out.

This worked for me and there's no easy way out of the shell that I can see.

Hope that helped.

unSpawn 01-23-2003 09:37 PM

This worked for me and there's no easy way out of the shell that I can see.
See http://online.securityfocus.com/infocus/1575 , down at "Breaking Out of Various Restrictions".


All times are GMT -5. The time now is 10:26 AM.