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


  Search this Thread
Old 05-05-2005, 03:15 AM   #1
LQ Newbie
Registered: Jul 2003
Distribution: Kubuntu 7.10 Gutsy Gibbon
Posts: 10

Rep: Reputation: 0
Unhappy Setting up a chroot jail


I was trying to set up a chroot jail when I hit this wall. Here is what I want to do, and what I did:

I want to create a user on my computer who is restricted to this jail. The user will be accessing my machine locally, and not through any network.

The directory structure that I created is as given below (jail is in /home/jail):

/bin /home /sbin /var
/home/prisoner1 /home/prisoner2

In /bin, I copied bash, ls, cat, cd, mkdir, and login.
In /sbin, I have shutdown and related files in /var.

In the .bashrc file of prisoner1, I have chrooted the user into the jail. The problem is, when the user types 'exit' at the shell, and types a *wrong* password, he gets out of the jail, on to the normal prompt. Also, login doesn't work. Is it because there is no password file given in the jail? Also, is .bashrc the file to be used to chroot the user?

I would also like to know what I'll have to do for the user to access X Windows.

Please help.

Old 05-06-2005, 01:31 AM   #2
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
my friend nitin wrote this small howto for me once

maybe this will help u



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
Chroot jail Gimpy Linux - Software 10 05-07-2010 02:30 PM
Chroot jail pachanga Linux - General 12 09-26-2008 06:15 AM
Jail and chroot rogk Linux - Security 2 10-16-2005 03:20 AM
chroot jail etc. f1uke Linux - Security 5 08-24-2005 04:12 AM
chroot jail simon Linux - Security 3 08-05-2001 09:21 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration