Thread: Managing Users

    #1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2016
    Location
    Lakewood, WA
    Posts
    226
    Rep Power
    18

    Managing Users


    I would like to set up an account where the user is "jailed" to their home directory *and* one or two other *specific* directories, but I'm unsure how to do this...

    OS: CentOS6
  2. #2
  3. Maddening Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,497
    Rep Power
    9645
    Take a look at jailkit.

    Comments on this post

    • Arty Zifferelli agrees : Very interesting indded...
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2017
    Location
    Minnesota, USA
    Posts
    24
    Rep Power
    0
    You could set up a chroot "jail", giving them only what you wanted them to have. This requires setting up (or symlinking) things like /bin and other directories with more restricted contents, but the end result is that the user will see only what you want them to see, and will not be able to see the system outside their chroot'ed environment.
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,555
    Rep Power
    4549
    You could set up a chroot "jail", giving them only what you wanted them to have.
    This is what jailkit does. https://olivier.sessink.nl/jailkit/
    ======
    Doug G
    ======
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2017
    Location
    Minnesota, USA
    Posts
    24
    Rep Power
    0
    It looks like jailkit just takes some of the work out of maintaining the chroot'ed path. You'd still be responsible for changing the user, deciding what files should be available in the chroot environment, etc. The jailkit documentation goes over everything that is required, both inside and outside of jailkit, in order to make it all work.

IMN logo majestic logo threadwatch logo seochat tools logo