Microsoft KB Archive/316740

= SMB Logoff Command Is Not Sent When Session Is Disconnected =

Article ID: 316740

Article Last Modified on 3/2/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows XP Professional
 * Microsoft Windows XP Home Edition

-



This article was previously published under Q316740



SYMPTOMS
Windows 2000 and Windows XP do not send an SMB Logoff & X command when an SMB session is disconnected from an SMB server that does not understand Microsoft Windows NT status codes. This includes certain UNIX servers such as Linux that is running Samba SMB Server, Microsoft Windows 98, Microsoft Lan Manager, and so on.



CAUSE
When you disconnect a mapped drive to a share on the server, the client sends a Tree Disconnect &X command to the server. If that is the last mapped drive to that server, this command is followed by a logoff &X command to clean up all sessions for that user. Windows 2000 and Windows XP clients do not send the logoff &X command to the SMB server if the server does not understand Windows NT status codes, even if the dialect that was negotiated is NT LM 0.12 (the highest version of dialect that is supported by Windows 2000 and Windows XP). This design change was made in Windows 2000 and Windows XP because many SMB servers that do not support Windows NT status codes cannot correctly handle session logoffs.



STATUS
This behavior is by design.



MORE INFORMATION
The user session is cleaned up when the transport session between the client and server is closed. For example, if you are using TCP/IP for the connection, Windows 2000 and Windows XP will close that TCP session with the server, ending the user session as well. Windows 2000 and Windows XP closes this transport session much sooner than earlier versions of Windows to prevent open user sessions to linger on the server.

