Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: how to get currently connected afp users
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get currently connected afp users

On Mar 31, 2007, at 9:02 AM, Stepan R. wrote:
Can anybody suggest me how to get a list of currently connected users over AFP or connected users to server in general? Is there a file I can read or a command which returns yes / no if particular user is connected?

I need this for a PHP application working with user home directories and I want to implement "user connected" check in order to avoid issues with homes being mounted/used on client machines.

There is no simple way to do this that I have found. There is a command line approach that I have used a few times.

serveradmin command afp:command = getConnectedUsers

will give you a ton of information about connected users. More than you probably want. If you do a grep with the output you can get a line that just lists the names of connected users:

serveradmin command afp:command = getConnectedUsers | grep "name"

You can execute this command from within php or do it as a cron job and save the results into a text file that php could open and read.

Hope this helps

Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

 >how to get currently connected afp users (From: "Stepan R." <email@hidden>)

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.