Windows 10 Password Error with Samba Share

13

11

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.

roms

Posted 2016-09-17T18:20:41.467

Reputation: 370

Answers

14

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.

roms

Posted 2016-09-17T18:20:41.467

Reputation: 370

11This 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 – 2017-06-19T19:57:57.650

15

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.

Niels

Posted 2016-09-17T18:20:41.467

Reputation: 261

should this be placed under [global] or samba-share? – waqaslam – 2019-05-31T21:59:29.267

1@waqaslam under [global] – Mike Kormendy – 2019-09-03T22:17:41.617

I can confirm this works. – Tyll'a – 2019-12-29T23:49:46.707

3

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

user76225

Posted 2016-09-17T18:20:41.467

Reputation:

1

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.

mcmacerson

Posted 2016-09-17T18:20:41.467

Reputation: 143

3For some people, this solution is good enough! Why downvote it just for semantic reasons? – Blisterpeanuts – 2019-01-27T02:39:13.840

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 – 2019-08-27T12:48:13.273

1

I would like to add, if you do choose to go with mcmacerson's file sharing over ssh solution (which is the only solution that worked for me after 2 hours of trying everything else), you'll also need to enable ssh on ubuntu (it's not enabled by default). Here's how to do it: https://linuxize.com/post/how-to-enable-ssh-on-ubuntu-18-04/

– Doomd – 2019-12-16T01:40:10.663