Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, I've been trying to jail a test user, and it is not working at all. Can someone give me or make up a script that'll chroot my user ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2013
    Posts
    1

    Shell Account Server help


    Hi all,

    I've been trying to jail a test user, and it is not working at all.

    Can someone give me or make up a script that'll chroot my user to their home directory.

    For CentOS 6.3, VPS

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    hello and welcome, zzombie!

    if you want a true remote shell, and not just an sftp shell (which is relatively easy), then you've got to manually set that up. there are some scripts and tools out there to help you, but the process is fairly involved. the reason for this is, you need to establish an entire root filesystem, albeit a simplistic one, in order for the user to have "shell access". think of it as a super-light virtual machine. the nice part is you have absolute full control over what the user can do, b/c whatever you don't include, they won't be able to run. i.e., if you don't include "tcpdump" in your user-root environment, then they can't run that, even though that command exist on the system itself.

    here is a very good tutorial on setting it up. the author includes a script he uses to copy binaries to the user-root, which includes library dependencies - very handy. give it a look.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •