Samba Authentication Issues

I tried today to connect to an old Samba server (ver. 2.2!!!) running on a developement Solaris box with a new account. I thought it would be a 2-minute job, however it made me through more than 2 hours into the waste bin as the connection failed with the very useful error message:
“System error 86 has occurred.”

For sure it was not an issue with the password so I checked the Samba log files where I found various entries like the following:

[2010/02/18 16:32:48, 0] passdb/pampass.c:pam_passcheck(405)
PAM: System Validation Failed - Rejecting User!

Digging around with PAM configuration, Unix authentication, Samba password databases and any other component involved I came out to the solution which lied on Windows Vista policy. Windows Vista by default use stong password encryption to connect to netbios shares which caused all troubles. What I had to do was the following:

  1. Go to Start Menu and Choose the option “Run”.
  2. Run the command “secpol.msc”
  3. Navigate to “Local Policies -> Security Options” and find the option “Network Security: LAN Manager authentication level”.
  4. Change its value from “Send NTLMv2 response only” to “Send LM & NTLM – use NTLMv2 session security if negotiated”.
  5. Click Ok and close the Security Policy window.
  6. Try to connect again and… voila!