How can I see users connected via AFP?

In Mac OS X, there’s a limit of 8 or so users that can connect via AFP to a computer. This is a rather silly attempt by Apple to force me to run OS X Server even though my machine is just a normal one that happens to need some users mounting my disk over Appleshare. It wouldn’t be an issue but for for a bug that apparently allows a machine to be mounted, then when it disconnects and re-connects, it counts as a “new” user, hence my computer is always saying that no more users can be added unless I turn off file sharing and then turn it back on again.

What I want to do is find a way via terminal or Applescript that will let me see which users are connected, and kick off the ones I know don’t need to be there. However I can find no starting point for this at all – can anyone help me with suggestions?

One time I saw this hint…
http://www.macosxhints.com/article.php?story=20011106224845476

It tells you how to enable logging for whenever someone logs in/out of your computer via afp. So my suggestion would be to turn on logging, then when you want to know who is logged in you read the log file into applescript and parse it however necessary to pull out the information. As far as logging someone off I don’t have any ideas for that.

Note: the plist file they mention in that hint might have something that would allow you to change the max number of users connected. And make sure the read the last post because it looks like the method to do this changed from what the original poster posted.

Awesome, I will try that. and post what I learn here.