mjd-lists-plug on Sat, 14 Dec 2002 02:30:09 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] how to chroot a user to a dir when she logs in?


> How to do this? I can't even run chroot as a regular user. I want this to
> just happen when they login.

You write a program that runs setuid root, and which performs the
chroot() call, then calls setreuid() to change its capabilities to
those of the real user, and then exec's the shell.

Then you name this program as the login shell program for the user in
/etc/passwd.

_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug