Output

The following array of settings is displayed for each connected user:

smb:usersArray:_array_index:i:disconnectID = <disconnectID>

smb:usersArray:_array_index:i:sessionID = <sessionID>

smb:usersArray:_array_index:i:connectAt = <connect-time>

smb:usersArray:_array_index:i:service = <service>

smb:usersArray:_array_index:i:loginElapsedTime = <login-elapsed-time>

smb:usersArray:_array_index:i:name = "<name>"

smb:usersArray:_array_index:i:ipAddress = "<ip-address>"

Value returned by getConnectedUsers

(smb:usersArray:_array_index:<n>:) Description

<sessionID>

An integer that identifies the user session.

<connect-time>

The date and time when the user connected to

 

the server.

 

 

<service>

The share point the user is accessing.

 

 

<login-elapsed-time>

The elapsed time since the user connected.

 

 

<name>

The user’s name.

 

 

<ip-address>

The user’s IP address.

 

 

Disconnecting SMB Users

You can use the serveradmin disconnectUsers command to disconnect SMB users. Users are specified by session ID.

To disconnect users:

$ sudo serveradmin command smb:command = disconnectUsers smb:sessionIDsArray:_array_index:0 = sessionid1 smb:sessionIDsArray:_array_index:1 = sessionid2 smb:sessionIDsArray:_array_index:2 = sessionid3 [...]

Control-D

Parameter

Description

sessionidn

The session ID of a user you want to disconnect. To list the session

 

IDs of connected users, use the getConnectedUsers

 

command. See “Listing SMB Users” on page 84.

 

 

Output

smb:command = "disconnectUsers"

smb:status = <status>

Value

Description

<status>

A command status code:

 

0 = command successful

Chapter 8 Working With File Services

85

Page 85
Image 85
Apple oxs manual Disconnecting SMB Users, Value returned by getConnectedUsers