The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Restrict user access to their home dir rdns UNIX for Dummies Questions & Answers 10 05-26-2008 07:28 AM
Restrict FTP access to a single directory for only one user. santhoshkumar_d UNIX for Advanced & Expert Users 8 05-23-2008 05:08 AM
How to restrict a user group to access the kernel harishankar HP-UX 0 08-08-2007 11:09 PM
restrict tcp-port access remivisser UNIX for Dummies Questions & Answers 2 05-18-2004 01:33 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 04-15-2008
Registered User
 

Join Date: Oct 2007
Posts: 65
Hi all,
Now i got some success in achieving jail.

I have used the above mentioned script fuschlberger.net - Howto Setup a chroot-jail for ssh/scp with Linux and ran it as

Code:

Quote:
./make_chroot_jail.sh jdoe /bin/bash /home/jail/./home/jdoe
Now, I need to give full access to other two directories to jdoe, say /tmp1 and /tmp2 which at present I cannot access when I login as ssh jdoe@localhost.

Here, I am pasting my variables.

Code:
bash-3.1$ set
BASH=/bin/sh
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="1" [2]="17" [3]="1" [4]="release" [5]="i686-redhat-linux-gnu")
BASH_VERSION='3.1.17(1)-release'
COLUMNS=157
DIRSTACK=()
EUID=501
GROUPS=()
HISTFILE=/home/jdoe/home/jdoe/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/jdoe/home/jdoe
HOSTNAME=RHEL
HOSTTYPE=i686
IFS=$' \t\n'
LD_LIBRARY_PATH=/usr/kerberos/lib
LINES=52
LOGNAME=jdoe
MACHTYPE=i686-redhat-linux-gnu
MAIL=/var/mail/jdoe
MAILCHECK=60
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/home/jdoe/home/jdoe/bin
PIPESTATUS=([0]="0")
PPID=18143
PS1='\s-\v\$ '
PS2='> '
PS4='+ '
PWD=/home/jdoe/home/jdoe
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=1
SSH_CLIENT='127.0.0.1 43358 22'
SSH_CONNECTION='127.0.0.1 43358 127.0.0.1 22'
SSH_TTY=/dev/pts/0
TERM=xterm
UID=501
USER=jdoe
_=set
-bash-3.1$

How, can I modify the script (or some other way) to achieve this ????

Pls help.

Thanks.

Last edited by vikas027; 04-15-2008 at 08:46 PM. Reason: wrong url by mistake
Reply With Quote
Forum Sponsor
  #9  
Old 04-20-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Like Jim suggested, add hard links to those directories to the root of the user's chroot jail.

Or do it the other way round, move them into the chroot jail and give other users access to those directories as necessary.
Reply With Quote
  #10  
Old 04-24-2008
Registered User
 

Join Date: Oct 2007
Posts: 65
thanks to all, you people helped me a lot.

Thanks again.
Reply With Quote
  #11  
Old 05-03-2008
Registered User
 

Join Date: Mar 2008
Posts: 83
Unhappy

I also tried this but i dont understand how to use this. I have downloaded the script, i want to do this with user mike, what command method should i follow, i tried all user can easily change the directories, pls guide me.

Regards,
Bash
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
chroot jail, linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0