VPN in Mac OS X Server (all versions, I think) allows users to have as many sessions from as many different computers as they want to the VPN server. I didn't like this, so I tried to find a way to restrict them to only one session. I tried looking at plists, thinking maybe Apple had some hidden option for this, but I couldn't find it. I then dug around in man files for vpn and pppd and such, and found something of interest in pppd's man page:
/etc/ppp/auth-upGreat! All I need now is some code and a way to find out which users are currently online.
A program or script which is executed after the remote system successfully authenticates itself. It is executed with the parameters:
interface-name peer-name user-name tty-device speed
Note that this script is not executed if the peer doesn't authenticate itself, for example when the noauth option is used.
After some more man reading, I found this command with grep to do just that:
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080625145536473