15

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.

22

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.

| improve this answer | |
  • should this be placed under [global] or samba-share? – waqaslam May 31 '19 at 21:59
  • 1
    @waqaslam under [global] – Mike Kormendy Sep 3 '19 at 22:17
  • I can confirm this works. – Tyll'a Dec 29 '19 at 23:49
  • This worked for me as well. Could someone please explain what this actually does, though? – Cethy Jul 19 at 20:10
15

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.

| improve this answer | |
  • 12
    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
6

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

| improve this answer | |
  • @user76225 This really helped me. Though I was using Win 10 Pro, the option in secpol.msc is disabled as it is joined to different domain with tight policies – Joy George Kunjikkuru Sep 2 at 23:06
3

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.

| improve this answer | |
  • 3
    For some people, this solution is good enough! Why downvote it just for semantic reasons? – Blisterpeanuts Jan 27 '19 at 2:39
  • 1
    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 '19 at 12:48
  • 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: linuxize.com/post/how-to-enable-ssh-on-ubuntu-18-04 – Doomd Dec 16 '19 at 1:40
0

There seems to be a new issue when trying to log into a Samba Share while also using Microsoft Account to log into Window. The issue behaves the same "Incorrect Password" and therefore I confused it with this issue for hours.

The solution is to use the Microsoft Account Credentials when trying to log into the Samba share (I know, this still does not make sense to me but it worked). Type: User:MicrosoftAccount\me@email.com PW:

This is documented here How to login to network share when Microsoft Account is tied to windows login?

| improve this answer | |

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