160 Chapter 9 Working with File Services
Viewing SMB User Information
To retrieve information about connected SMB users, use the serveradmin
getConnectedUsers command. For example, you can use this command to retrieve the
session IDs you need to disconnect users.
To view connected user information:
$ sudo serveradmin command smb:command = getConnectedUsers
The computer responds with the following array of settings for each connected user:
smb:usersArray:_array_index:i:loginElapsedTime = <login-elapsed-time>
smb:usersArray:_array_index:i:service = <service>
smb:usersArray:_array_index:i:connectAt = <connect-time>
smb:usersArray:_array_index:i:name = "<name>"
smb:usersArray:_array_index:i:ipAddress = "<ip-address>"
smb:usersArray:_array_index:i:sessionID = <sessionID>
syncPrefs
Update the service to recognize changes in share points.
See “Updating Share Point Information” on page 162.
writeSettings Equivalent to the standard serveradmin settings command,
but also returns a setting indicating whether the service must be
restarted. See “Using the serveradmin Tool” on page 50.
Command (smb:command=) Description
Value returned by getConnectedUsers
(smb:usersArray:_array_index:<
n
>:) Description
<login-elapsed-time> The elapsed time since the user connected.
<service> The share point the user is accessing.
<connect-time> The date and time the user connected to the
server.
<name> The user’s name.
<ip-address> The user’s IP address.
<sessionID> An integer that identifies the user session.
Comments to this Manuals