LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-09-2008, 01:01 PM   #1
sulekha
Member
 
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324

Rep: Reputation: 36
Question restricted shell


Dear all,

this is what i have read in the book ubuntu linux unleashed,

if you have a desire to severly restrict what a user can do, you can provide him with a restricted shell. to run a restricted bash shell, you would use the -r option

ex:- bash -r

then try to do something that you could do as a regular user, such as
ls -a,

you will then see

bash: ls: no such file or directory


now my question is suppose i have my shell restricted, how to make it back un restricted ?
 
Old 07-09-2008, 03:29 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
If you changed your own shell to restricted, and have no access to another account in which to become root, you'll have to boot from a livecd / rescue CD to change it back. Since the restricted shell prevents you from specifing any command with a / in the pathname, and you can't change your PATH, you are stuck.
 
Old 07-09-2008, 04:00 PM   #3
simonapnic
Member
 
Registered: Jul 2008
Posts: 70

Rep: Reputation: 16
Post

I don't advise you to use restricted bash shells..
There are better choices like chroot, jail shells and others.
And definitely you shouldn't do it to yourself, especially if you're using the root account (which many security experts don't recommend).
 
  


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 help rtaft Linux - Security 3 04-01-2008 01:51 PM
need more restricted shell then rbash redss Linux - General 3 01-26-2006 10:55 AM
Restricted Shell in RedHat 6.2 yuzuohong Linux - General 1 03-20-2003 10:06 AM
Restricted shell Rocket01 Linux - Software 3 01-23-2003 10:37 PM
Restricted Shell johnlee Linux - Security 3 10-29-2001 09:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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