9

I am trying to connect to a samba share with Windows 10 Pro (Version 1511, Build 10586.589) using the command net use L: \\myserver\myshare /u:myuser mypassword. I get the error:

System error 86 - The specified network password is not correct.

I get the same result when using the Map network drive dialog. Other clients (Android, Linux) can connect just fine with the same user/password.

I have tried adjusting the following security policies via secpol.msc:

  • Microsoft network client: Send unencrypted password to third-party SMB servers (enabled and disabled)
  • Netword security: LAN Manager authentication level (Send LM & NTLM responses, Send LM & NTLM - use NTLMv2 session security if negotiated
  • Network security: Minimum session security for NTLM SSP based clients/servers (128-bit encryption and none)

I am running samba 4.5.0-2 on Arch Linux (4.7.4-1). Server-side, I have reset the user password, removed and re-added the user to the smbpasswd backend, and started and restarted the smbservice.

My smbconf is basically the default:

 [global]
   workgroup = MYGROUP
   server string = Samba Server
   log file = /var/log/samba/%m.log
   max log size = 50
   security = user
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
   unix password sync = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
   dns proxy = no
[my share]
   comment = my share
   browseable = yes
   writable = yes
   guest ok = no
   path = /pathto/myshare
   public = no
   valid users = myuser
   create mask = 770

I don't see anything out of the ordinary in testparm, and I have confirmed via pdbedit that my user is definitely registered with the backend.

It has worked fine before today and I do not know why it suddenly stopped working. Any advice is greatly appreciated.

13

if anyone else runs into this problem, my solution was to adjust the security policies on the Windows client.

Run > Secpol.msc

then I set Local Policies > Security Options > Network Security: LAN Manager authentication level to 'Send NTLMv2 response only. Refuse LM & NTLM'

and the client connects just like before.

  • 8
    This solved it for me, but I didn't feel happy with it, as it requires a change on all my machines. Instead adding the line ntlm auth = yes to my smb.conf did the trick as well. – Arsenal Jun 19 '17 at 19:57
8

You can also fix this on the server (Ubuntu 18.04.1 LTS) side: In /etc/samba/smb.conf, put:

ntlm auth = true

And it works like a charm.

  • should this be placed under [global] or samba-share? – waqaslam May 31 at 21:59
  • @waqaslam under [global] – Mike Kormendy Sep 3 at 22:17
2

The accepted answer is correct, and works for Windows 10 Professional and above. However, Windows 10 Home Premium lacks secpol.msc and its easy-to-use interface.

To fix this on Windows 10 Home Premium, navigate to the following key in the registry:

HKLM\SYSTEM\CurrentControlSet\Control\Lsa

Look for a DWORD value named LmCompatibilityLevel. If it does not exist, create it. Set the value to 5.

After making this change, I was immediately able to access the Samba server without restarting.

Source: Changing LAN Manager Authentication on Windows NT

0

And when you get tired of fighting with Windows and Samba, go here:

https://github.com/billziss-gh/sshfs-win

It's file sharing over SSH. No need for Samba or trying to get Windows to play nice.

  • 2
    For some people, this solution is good enough! Why downvote it just for semantic reasons? – Blisterpeanuts Jan 27 at 2:39
  • Because it's not related to the question? If someone wants an alternative then they can Google 'Samba windows alternative or something similar. – Levi H Aug 27 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.