Unix Technical Forum

How to prevent a user from browsing other directories than his home

This is a discussion on How to prevent a user from browsing other directories than his home within the AIX Operating System forums, part of the Unix Operating Systems category; --> Thank you all for your answers Ok i'll try to be more precise : I have a dozen AIX ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 06:29 AM
howard
 
Posts: n/a
Default How to prevent a user from browsing other directories than his home

Thank you all for your answers

Ok i'll try to be more precise :

I have a dozen AIX servers in my LAN.
One of them has to be accessed from outside by people who'll test new
batches.
These batches are located in a specific file system : lets say /batch.
These batches are run with a generic unix account : lets say
batch_user


Using rsh support will be tricky since all batches (at least 20) are
run using different parameters.
So now i am looking for a chroot solution but it is very difficult to
implement it. Any advise would be appreciated

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 06:29 AM
Laurenz Albe
 
Posts: n/a
Default Re: How to prevent a user from browsing other directories than his home

howard <pamz@libertysurf.fr> wrote:
> Ok i'll try to be more precise :
>
> I have a dozen AIX servers in my LAN.
> One of them has to be accessed from outside by people who'll test new
> batches.
> These batches are located in a specific file system : lets say /batch.
> These batches are run with a generic unix account : lets say
> batch_user
>
> So now i am looking for a chroot solution but it is very difficult to
> implement it. Any advise would be appreciated


It should not be very difficult.
Try to set up a 'cage' to chroot into; you must have all the necessary
shared libraries and executables there, as well as some files from /etc.
Start with ksh and the libc.a library, when you try
'chroot /batch /usr/bin/ksh' it will tell you what is still missing.

Once you can run everything you need in the chroot environment, you can
setup the user's account so that he gets dropped into chroot on login.

The problem here is that the chroot command is root only, so you cannot
simply specify '/usr/sbin/chroot ...' as login shell for the user.

However, it should not be too hard to write a little C program that
uses chroot(2), then drops root privileges with setuid(2) and exec(2)s
the login shell of the user.
If this program belongs to root and has the set-user-ID flag set, it
should do the trick and you can use it as login shell for the user.

I hope I did not overlook anything important.

Yours,
Laurenz Albe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:30 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com