Networking Vista and Linux

Networking Vista and Linux

Straight out of the box, file sharing between a Linux PC and a Windows PC generally won’t work. The primary cause is Vista’s lack of NTLM authentication by default. It ships with the newer, more secure NTLMv2 enabled. Samba in Linux, on the other hand, is exactly reversed. It ships with support for the older protocols enabled and v2 disabled. Other settings that can prevent or cause other problems with file sharing are: mismatched workgroup, firewall rules and, if you’re having problems making changes to shared files within Vista, the Offline Files setting.

On the Linux side of your router, it’s important to have ntlmv2 enabled and Samba updated above 3.0.4, since this version and below have a couple of serious security holes. Enabling ntlmv2 is as simple as setting ‘client ntlmv2 auth = yes’ in /etc/samba/smb.cnf, though you may find a nice Samba GUI more convenient to do this and change the workgroup/netbios names. A more thorough guide to Samba set up can be found in the Gentoo wiki. If any of this proves impossible for whatever reason, it is possible to downgrade Vista to use NTLM. To do this hold the Windows key and press ‘R’ (alternative: click the start menu and ‘Run’). In the box type secpol.msc and hit enter. In the ‘Local Policies’ folder select the ‘Security Policies’ folder and right click Network Security: LAN Manager Authentication level, selecting ‘Properties’ in the context menu. In the dropdown menu, where is most likely says ‘Send NTLMv2 response only’, select the second option: ‘Send LM & NTLM – use NTLMv2 session security if negotiated’.
The Vista Firewall is generally not an issue, since it automatically allows traffic on the correct ports when file sharing is enabled. If you have a third party firewall, you’ll need to check its documentation for the correct settings. Most have a simple ‘Allow Windows File and Printer Sharing’ option in their configuration menu, but this can vary quite a bit. Microsoft also has a few tips for configuring your firewall.
In the Start menu, if you right click ‘Computer’, on the right side of the menu, and select ‘Properties’ you’ll see the name of the workgroup your computer is currently a part of (default is ‘WORKGROUP’). Whether you use the default or opt to change it to something completely different, the workgroup name on the Vista box and every other machine in the network must match for this to work properly. On this same dialog, there is a link/button marked ‘Change Settings’, that’s where you can edit this name should you feel so inclined.
You will, of course, need to turn on file sharing. Do this by opening the start menu, right clicking ‘Network’ and selecting ‘Properties’ in the context menu. Network discovery and file sharing should be ‘On’. Use public folder sharing if you want anyone on the local network to be able to view the public folders. Password protected sharing limits this to those with an account and password on the computer where the folders physically reside. For this, you will want an identical username/password account pairs on every computer that will be accessing the shares. Those are pretty much it. With all this in place, you should have no problems sharing across your network.
Enabling NTLMv2 on various Windows versions.


Archived in