LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-23-2003, 06:56 PM   #1
Rocket01
LQ Newbie
 
Registered: Jan 2003
Location: Milford Ct
Posts: 1

Rep: Reputation: 0
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
 
Old 01-23-2003, 07:47 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

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

Cool
 
Old 01-23-2003, 08:10 PM   #3
Soma
LQ Newbie
 
Registered: Dec 2002
Posts: 24

Rep: Reputation: 15
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.
 
Old 01-23-2003, 10:37 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
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".
 
  


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
Restricted shell to change the password mussons Linux - Security 12 07-24-2003 11:05 PM
Restricted Shell in RedHat 6.2 yuzuohong Linux - General 1 03-20-2003 10:06 AM
restricted shells sandy Linux - General 1 08-22-2002 12:24 PM
restricted shells sandy Linux - General 0 08-22-2002 04:18 AM
Restricted Shell johnlee Linux - Security 3 10-29-2001 09:02 AM


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