|
 |
|
 |
06-22-2002, 12:29 AM
|
#1 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,470
|
jail/ chroot / whatever it's called.. how do i?
i want to allow a user to access my linux debian box.
i don't want them to be able to see my entire directory .. only the directory i specify as theirs. .. kinda like how web hosts do it.
the will need ftp and ssh access .. how can i lock them to their one directory, and not let them view anything above their home?
any ideas?
|
|
|
06-22-2002, 02:15 AM
|
#2 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,695
|
You could use any of the restricted shells..
r*sh, rbash is bash in restricted mode, rsh is sh in restricted mode.
http://www.lns.cornell.edu/public/CO...f_7.html#SEC77
As default BSD will trap users in a restricted mode, if their shell is beginning with a 'r'
|
|
|
06-22-2002, 08:23 AM
|
#3 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,470
|
thanks a lot redhead. that's the first time i've had that type of control over a user's login.. but i need to do something a little different.
that restricted the user to only their home directory. so even if they create a subdirectory themselves, they can not use the "cd" command to get in it.
also, for some reason, ftp would not work for that user when i restricted them.
i'm need to read more here.
|
|
|
06-22-2002, 01:51 PM
|
#4 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,695
|
Quote:
Originally posted by mmilano
that restricted the user to only their home directory. so even if they create a subdirectory themselves, they can not use the "cd" command to get in it.
|
Hmm... never tried anything that restricted.. Only the 'cd ..' restriction..
Quote:
Originally posted by mmilano
also, for some reason, ftp would not work for that user when i restricted them.
i'm need to read more here.
|
The reason why ftp wont accept login into a restricted shell, is because it's not listed in /etc/shells, put the r*sh you're using in there aswell, and ftp has access to it.
|
|
|
06-22-2002, 04:23 PM
|
#5 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,470
|
Quote:
Originally posted by redhead
Hmm... never tried anything that restricted.. Only the 'cd ..' restriction..
|
i don't want it to restrict 'cd' , but it is restricting that command for some reason. =/
|
|
|
06-22-2002, 11:44 PM
|
#7 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,695
|
Download it, get the source for your openssh, untar/gz it, enter the openssh-3.1p1 dir that emerges and issue the command:
patch -p1 < /the/downloadet/openssh-3.1p1-chroot.patch
Make sure, its the openssh-3.1p1 version you use it on, since theres allready a 3.3p1 version, but this patch was orriginaly made to 3.1p1.
Then just use your regular:
./configure --with-chroot && make && make install
Restart your sshd, and you can now use chrooted $HOME via ssh.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 10:37 PM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|