-   Linux - General (
-   -   Jailing an user (

SiLiCoN 10-08-2004 01:10 AM

Jailing an user

I would like to know if there is a way (well, there certainly is) to lock a particular user (or all users) in their home directory. This is exactly what i m looking for -
There is a centrally located Linux (RedHat 9.0) server to which users login to their shell accounts. Now what i want to do is to restrict the users to their home directory so that they cant move out of their home directory - in other words chroot $HOME - but that is only possible as r00t. i tried adding "chroot $HOME" line in /etc/bashrc but that can be executed only as root. So is there a way that whenever someone logs in - he cant move out of his home directory ----- both for FTP and shell...


amfoster 10-08-2004 07:00 AM

There are several ways, the easiest is to give them a restricted shell
bash -r
or rbash (same)

SiLiCoN 10-08-2004 08:11 AM

with bash -r or "rbash" i cant even move down a directory....????
this is not what i want....i want the users to restrict to move up a directory

amfoster 10-09-2004 12:43 AM

Oops sorry, I misread what you were looking for. rbash is very restrictive. User can't change system variables or anything.

XavierP 10-09-2004 04:49 AM

Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

FUP here:

All times are GMT -5. The time now is 11:49 PM.