I Need Simplest & Easy Way To Jail Users in there home directories
simple configuration to jailing users (with full help or some good web links )
|
I Need Simplest & Easy Way To Jail Users in there home directories simple configuration to jailing users (with full help or some good web links ) |
|||||||||||||
|
|
I think you're looking for ChrootDirectory option of OpenSSH. There is a tutorial here. |
|||||||
|
|
You can not confine them to /home as they need access to the system binaries and bash and configuration files in /etc IMO the easiest method of securing users is to use apparmor. You make a hard link
You add jailbash to /etc/shells You then assign jailbash to the users shell, and then write an apparmor profile for jailbash allowing minimal access.
You will have to write an apparmor profile yourself, but I have a profile you could potentially start with http://bodhizazen.net/aa-profiles/bodhizazen/ubuntu-10.04/usr.local.bin.jailbash |
|||||||||||||||
|
|
Jailkit is a set of utilities that can limit user accounts to a specific directory tree and to specific commands. Setting up a jail is much easier using the jailkit utilities that doing so 'by hand'. A jail is a directory tree that you create within your file system; the user cannot see any directories or files that are outside the jail directory. The user is jailed in that directory and it subdirectories. Download & Install http://olivier.sessink.nl/jailkit/index.html#download
Now it’s time to set up the jail directory. Jailed users will see this directory as the root directory of the server. I chose to use /home/jail:
Add a new user with a home directory and bash shell, and set the password:
Without the -d argument the real update is performed. More maintenance operations can be found here. Help Taken
|
|||
|
|
|
It's difficult to guess what purpose you might want to accomplish. If it is to deny ssh/sftp while providing jailed access via FTP... easy: Add to /etc/shells a new shell:
Add one line:
Save. For each user you want to deny ssh/sftp, change the user's shell:
Now userx cannot log in via ssh/sftp. Install vsftpd:
Edit the config file:
And some changes....
Save. Restart vsftpd:
|
|||
|
|
|
You could check out
Search for Or look on this page http://linux.die.net/man/1/bash |
|||||||||||
|