Specifications
Chapter 9 Working with File Services 161
Disconnecting SMB Users
To disconnect SMB users, use the serveradmin disconnectUsers command. 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
The computer responds with the following output:
smb:command = "disconnectUsers"
smb:status
= <status>
Listing SMB Service Statistics
To display a list of the number of SMB connections, use the smbstatus command.
To list connections:
$ smbstatus
The computer responds with the following output:
Samba version 3.0.10
PID Username Group Machine
---------------------------------------------------------------------
8287 ajohnson officegroup mycomputer (123.123.12.12)
Service pid machine Connected at
---------------------------------------------------------------------
IPC$ 8287 mycomputer Fri Jan 13 06:06:15 2007
No Locked Files
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 “Viewing SMB User Information” on page 160.
Value Description
<status> A command status code.
0 = command successful