Hi, I call this "session hooks" because I don't know what else to call it. What I mean is the extra "stuff" that will happen before and after a login session or a command gets executed, such as fetching AFS tokens upon startup and destroying kerberos tickets upon shutdown. My need for this patch occured when I needed a couple of additional "hooks" that wasn't supported. I started out trying to throw them in as a local hack, but then discovered clashes between some of the libraries that the various pieces of software used. Thus, I ended up adding a generic hook that executes a configurable external command. In my case, it is a shell script that in turn executes a sequence of command-line tools from the various non-compatible software distributions. The end result is the same, with one exception: when invoking external commands instead of library routines, the are run as separate processes and thus cannot define or modify the user's environment. Thus, support to convey this information from the session hook was added as well. The solution here is a bit rough at the edges (create a temporary environment file that is then sourced by the other process) but it works. Please take a look at these contributions, give feedback, and let me know if you would consider it for inclusion in future releases of OpenSSH: http://www.pdc.kth.se/~mulmo/session-hooks/ Regards, /Olle