how can i jail a user?


 
Thread Tools Search this Thread
Operating Systems Linux how can i jail a user?
# 1  
Old 04-06-2004
how can i jail a user?

I created a user
useradd -d /disk2/ftpfiles me

How would i beable to jail me so he could not move arround my file system?
# 2  
Old 04-07-2004
I don't think you will get a simple answer on this one. You may want to google for chroot or restricted shell. It really depends on how much effort you want to put into it and what kind of access the users will have. If you plan to only give a user FTP access, chroot may work. If they are only telneting, ksh -r (restricted shell) may work. In either case there is a tedious set up and you have to be very meticulous about your permissions and umasks. I have played with chroot and ksh -r a few times but have never really had the need to fully jail users in the environments I have worked in. Someone from an ISP may be able to give you more guidance but I figured something was better then nothing.
# 3  
Old 04-07-2004
Thanks, i did lots or reading lastnight bout jailing users but most of the websites for it is for proftp, i'll look up restricted shells though. I'm jsut setting up an FTP for myself and my friends, there not really rocket scientists so i just want to prevent them from doing somthing stupid accidentaly. My professor showed me a really easy way last semester, i'm going to try to hunt him down today and find out what that was. Thanks.
# 4  
Old 04-12-2004
Im guessing your useing ProFtp?

If thats the case, and you whant to "jail" a user
you could simply change/make a line in the config file

My conf file is in - /etc/proftp.conf
simply put this line in it:

DefaultRoot "~"

that would make the users home dir the absolute root for the user.

it is still possible to login via telnet/ssh/rlogin with that
user and pass. So thats a problem.

Ive tryed to put (in /etc/passwd file) /false instead of like /bash
as shell, but that will only make the ftp to deny access
# 5  
Old 04-12-2004
Actuily i'm using Wu-ftp but i'm in the process of setting up my system again so i may this time use ProFtp, just cause it seems to be so popular.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Cybersecurity

How to jail a process?

Hello people, I'm creating a web game control panel, where people can manage their gameserver on a php made control panel. But i have no idea how to create an jailed inviroment for the gameserver, I've looked at possebilites for chroot, but i don't want the gameserver has any binaries of linux... (1 Reply)
Discussion started by: gm33
1 Replies

2. Cybersecurity

How to jail a process in his repertory ?

Hi all, I want to jail a process in his folder, so he can't have any link with a parent folder. Ex. If i'm a hacker, and I can upload my script & and I can start it, i'll could go to ../, /etc/passwd, etc.. So what I did is to chroot the process : I copied all libraries used by the... (1 Reply)
Discussion started by: Deb.I.am
1 Replies

3. UNIX for Advanced & Expert Users

ssh jail user

I have a developer that needs ssh access to a server to get to a specific directory. I want to restrict them to that directory. I've tried to set their shell as rksh which does jail them but only if they are using ssh from another unix system. If they are using putty or winscp they can still... (2 Replies)
Discussion started by: toor13
2 Replies

4. Solaris

How to Jail ftp user

Hi Gurus, I am creating a user for ftp only on Solaris 10. However while testing I can see user can reach to root directory. I followed following while creating the user 1 Created a shell in /usr/bin/ftponly as chmod a+x to ftponly 2 Placed the entry in /etc/shells ... (2 Replies)
Discussion started by: kumarmani
2 Replies

5. UNIX for Dummies Questions & Answers

How to start a chroot jail?

I was reading an article on how it is very important to setup a chroot jail to run bind. I can follow what the article says but one thing I am unclear about is now on system boot the BIND process in the chroot jail will start since it the owner will no longer be root but some other user. Can... (1 Reply)
Discussion started by: mojoman
1 Replies

6. What is on Your Mind?

Should Paris Hilton be in Jail?

Enough of boring techie topics!! Vote on Paris Hilton and her jail time!! What do you think? (9 Replies)
Discussion started by: Neo
9 Replies

7. UNIX for Advanced & Expert Users

FBSD jail question

I'm trying to establish a jail on a FBSD 6.1 system and have a couple of questions on bringing up the daemon. Under the jail man page there are two user flags that I am unclear on, -u username The user name from host environment as whom the command should run. -U... (1 Reply)
Discussion started by: thumper
1 Replies
Login or Register to Ask a Question