jailkit-users
[Top][All Lists]
Advanced

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

[Jailkit-users] Run script before chroot


From: DTakemori
Subject: [Jailkit-users] Run script before chroot
Date: Sun, 29 Mar 2009 09:43:36 -1000


Suppose I have a user (or set of users) that are jailed via jk_chrootsh:

/etc/passwd:
foo:x:500:500::/var/jails/foo/./home/foo:/usr/bin/jk_chrootsh

is there a way to have a script/executable run when the user logs in
but before the chroot?  Ordinarily I would add something to
/var/jails/foo/etc/profile or /etc/csh.login or something, but I want
this pre-login to access something necessarily outside the jail.

artificial example: Print something on login without giving jailed
user access to printer.

#!/bin/sh
echo `whoami` " logged into jail at " `date` >> /dev/lp



Dean Takemori
Systems Support Supervisor
TD Food Group
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]