Today I was troubleshooting an issue with an old legacy application that requires opportunistic locking to be disabled on the server. After doing some research, I discovered, that, if you disable opportunistic locking on the server, If you disable opportunistic locking, the offline files feature in Windows Vista fails. This could be a really bad thing. Also, as in my case, the client is using all Windows Vista workstations, which by default use SMB 2.0 with a 2008 server. The registry setting for this change has also changed, per Microsoft KB article 296264 .
A thought came about, what if I disable SMB 2.0 on the server, then the workstation would be forced to use SMB 1.0 and I can use the old opportunistic locking disable feature. But boy, that would certainly slow down the SMB on the network, thus resulting in another situation. I had to figure out how to disable SMB 2.0. Looking in the Microsoft Resource Kit for Vista and 2008, I found how. Here is how to disable it:
To disable SMB 2.0 on Vista clients, run the following commands with elevated privileges:
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled
To disable SMB 2.0 on Windows Server 2008, add the following registry value:
Value name: Smb2
Value type: REG_DWORD
Value data: 0
Reboot both the Vista machine and the server to cause SMB 2.0 to be disabled.
Follow these steps below to enable SMB 2.0 on both Vista and SBS 2008:
To enable SMB 2.0 on Vista clients, run the following commands with elevated privileges:
sc config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc config mrxsmb20 start= auto
To enable SMB 2.0 on SBS 2008, modify the Smb2 value data to 1.
I hope this helps someone else needing to do this. I highly don’t recommend disabling this, as your network communication will slow down dramatically, but if you have an old application and need to do some testing, this will certainly help rule SMB 2.0 out of the equation.