SMB file shares not connecting - Duplicati as Service

This week my computer updated to Windows 10 release 2004

Hello,
Make sure SMBv1 support is disabled in Settings > Programs and Features > Turn Windows Features on or off.

https://forum.kodi.tv/showthread.php?tid=353532

I don’t believe that is the problem. SMBv1 is disabled by default on fresh Win10 installs since 1709, I believe. In any case it’s more likely something doesn’t work by having it disabled (if the remote side doesn’t know how to speak SMBv2 or 3).

In my case I reproduced the problem with a NAS on the remote side that knows how to speak SMBv2-3.

I have tried it with and without SMB 1.0 and it didn’t seem to make a difference. At any rate, the service works when running under my own user account, with or without SMB 1.0, even when I use a different username and password to make Dulicati’s connection to a share that is inaccessible on the desktop due to Windows Explorer being logged into the file server under another account.

Strange.

I am having the same problem. Definitely started after a windows update.

Duplicati, running as a service, can no longer connect to my configured destination. When I try “Test Connection”, it says the destination does not exist, asks me if I want to create it. If I reply yes, it errors out. And when running the backup I get Duplicati.Library.Interface.FolderMissingException

However, I have no problem connecting from a command window using net use \\myshare\mylocation password /user:myuser to connect with the configured credentials (which is different than the logged in user).

The same configuration was working fine two weeks ago. I had upgraded to Windows 2004.

Is your service running as LocalSystem? Or is it tied to some other user account?

Sounds like you have the same issue as OP, and I also was able to reproduce it.

My service is running as LocalSystem.

Ok good, that’s in line with OP and my experience. There is some security change in Windows 10 2004 that is affecting this.

1 Like

Has anyone opened an issue in GitHub for this?

I opened an issue on GitHub and just added the link to this thread. Issue no. is 4240

Just spotted this thread and it reminded me I needed to set up a backup on my main machine that was local and not just to the cloud. I too am on Win 10 build 2004, and my destination is a Windows 2019 core server, on my AD domain and the SMB share is running on a ReFS formatted Storage Spaces volume.

Duplicati is build 2.0.5.107_canary_2020-05-26 and is running as a service under Local System. The backup job specifies a domain username/passsword for access.

All is running well so far and I have no issues - files are being created in the share as I write. Will update this once the job is finished either way.

I’m wondering if domain membership is a factor. It’s possible the security change only affects non-domain joined machines.

I believe the reason your scenario works is because of the known-device relationships implicit in domain membership. If you were to back up from/to non-joined machines on a fresh Windows install, such as from an non-joined fresh Windows install to a non-joined Linux machine via Samba, I believe you would have a different experience. Something changed in version 2004 that has created problems. If you can try that, would you please let us know what happens?

Just did that, workgroup installation, used the same domain account as on my main PC for the credentials to the same SMB share just a different sub-folder, although I’m all Windows here for the most part so no Samba, and still works:

{
  "DeletedFiles": 0,
  "DeletedFolders": 0,
  "ModifiedFiles": 0,
  "ExaminedFiles": 3,
  "OpenedFiles": 2,
  "AddedFiles": 2,
  "SizeOfModifiedFiles": 0,
  "SizeOfAddedFiles": 23928494,
  "SizeOfExaminedFiles": 23928668,
  "SizeOfOpenedFiles": 23928494,
  "NotProcessedFiles": 0,
  "AddedFolders": 1,
  "TooLargeFiles": 0,
  "FilesWithError": 0,
  "ModifiedFolders": 0,
  "ModifiedSymlinks": 0,
  "AddedSymlinks": 0,
  "DeletedSymlinks": 0,
  "PartialBackup": false,
  "Dryrun": false,
  "MainOperation": "Backup",
  "CompactResults": null,
  "VacuumResults": null,
  "DeleteResults": null,
  "RepairResults": null,
  "TestResults": {
    "MainOperation": "Test",
    "VerificationsActualLength": 3,
    "Verifications": [
      {
        "Key": "duplicati-20200630T162909Z.dlist.zip",
        "Value": []
      },
      {
        "Key": "duplicati-ie2ef0103578642eb8ba2917d74d8772c.dindex.zip",
        "Value": []
      },
      {
        "Key": "duplicati-bb21f094b8fbb421087f6d030c763c402.dblock.zip",
        "Value": []
      }
    ],
    "ParsedResult": "Success",
    "Version": "2.0.5.107 (2.0.5.107_canary_2020-05-26)",
    "EndTime": "2020-06-30T16:29:11.8085959Z",
    "BeginTime": "2020-06-30T16:29:11.2923968Z",
    "Duration": "00:00:00.5161991",
    "MessagesActualLength": 0,
    "WarningsActualLength": 0,
    "ErrorsActualLength": 0,
    "Messages": null,
    "Warnings": null,
    "Errors": null,
    "BackendStatistics": {
      "RemoteCalls": 8,
      "BytesUploaded": 22925071,
      "BytesDownloaded": 22925071,
      "FilesUploaded": 3,
      "FilesDownloaded": 3,
      "FilesDeleted": 0,
      "FoldersCreated": 0,
      "RetryAttempts": 0,
      "UnknownFileSize": 0,
      "UnknownFileCount": 0,
      "KnownFileCount": 6,
      "KnownFileSize": 22927657,
      "LastBackupDate": "2020-06-30T18:29:09+02:00",
      "BackupListCount": 2,
      "TotalQuotaSpace": 5994633494528,
      "FreeQuotaSpace": 1910532800512,
      "AssignedQuotaSpace": -1,
      "ReportedQuotaError": false,
      "ReportedQuotaWarning": false,
      "MainOperation": "Backup",
      "ParsedResult": "Success",
      "Version": "2.0.5.107 (2.0.5.107_canary_2020-05-26)",
      "EndTime": "0001-01-01T00:00:00",
      "BeginTime": "2020-06-30T16:29:09.5267385Z",
      "Duration": "00:00:00",
      "MessagesActualLength": 0,
      "WarningsActualLength": 0,
      "ErrorsActualLength": 0,
      "Messages": null,
      "Warnings": null,
      "Errors": null
    }
  },
  "ParsedResult": "Success",
  "Version": "2.0.5.107 (2.0.5.107_canary_2020-05-26)",
  "EndTime": "2020-06-30T16:29:11.8242474Z",
  "BeginTime": "2020-06-30T16:29:09.5267385Z",
  "Duration": "00:00:02.2975089",
  "MessagesActualLength": 17,
  "WarningsActualLength": 0,
  "ErrorsActualLength": 0,
  "Messages": [
    "2020-06-30 18:29:09 +02 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started",
    "2020-06-30 18:29:09 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started:  ()",
    "2020-06-30 18:29:09 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed:  (3 bytes)",
    "2020-06-30 18:29:10 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-bb21f094b8fbb421087f6d030c763c402.dblock.zip (21.85 MB)",
    "2020-06-30 18:29:10 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-20200630T162909Z.dlist.zip (979 bytes)",
    "2020-06-30 18:29:10 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-20200630T162909Z.dlist.zip (979 bytes)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-bb21f094b8fbb421087f6d030c763c402.dblock.zip (21.85 MB)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-ie2ef0103578642eb8ba2917d74d8772c.dindex.zip (15.98 KB)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-ie2ef0103578642eb8ba2917d74d8772c.dindex.zip (15.98 KB)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started:  ()",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed:  (6 bytes)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-20200630T162909Z.dlist.zip (979 bytes)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-20200630T162909Z.dlist.zip (979 bytes)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-ie2ef0103578642eb8ba2917d74d8772c.dindex.zip (15.98 KB)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-ie2ef0103578642eb8ba2917d74d8772c.dindex.zip (15.98 KB)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-bb21f094b8fbb421087f6d030c763c402.dblock.zip (21.85 MB)",
    "2020-06-30 18:29:11 +02 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-bb21f094b8fbb421087f6d030c763c402.dblock.zip (21.85 MB)"
  ],
  "Warnings": [],
  "Errors": [],
  "BackendStatistics": {
    "RemoteCalls": 8,
    "BytesUploaded": 22925071,
    "BytesDownloaded": 22925071,
    "FilesUploaded": 3,
    "FilesDownloaded": 3,
    "FilesDeleted": 0,
    "FoldersCreated": 0,
    "RetryAttempts": 0,
    "UnknownFileSize": 0,
    "UnknownFileCount": 0,
    "KnownFileCount": 6,
    "KnownFileSize": 22927657,
    "LastBackupDate": "2020-06-30T18:29:09+02:00",
    "BackupListCount": 2,
    "TotalQuotaSpace": 5994633494528,
    "FreeQuotaSpace": 1910532800512,
    "AssignedQuotaSpace": -1,
    "ReportedQuotaError": false,
    "ReportedQuotaWarning": false,
    "MainOperation": "Backup",
    "ParsedResult": "Success",
    "Version": "2.0.5.107 (2.0.5.107_canary_2020-05-26)",
    "EndTime": "0001-01-01T00:00:00",
    "BeginTime": "2020-06-30T16:29:09.5267385Z",
    "Duration": "00:00:00",
    "MessagesActualLength": 0,
    "WarningsActualLength": 0,
    "ErrorsActualLength": 0,
    "Messages": null,
    "Warnings": null,
    "Errors": null
  }
}

{
  "CreatedByVersion": "2.0.5.107",
  "Schedule": null,
  "Backup": {
    "ID": "1",
    "Name": "Test SMB Backup",
    "Description": "",
    "Tags": [],
    "TargetURL": "file://\\\\LISA\\NELSON\\DUPLICATI\\TEST\\?auth-username=star-one\\administrator",
    "DBPath": "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\Duplicati\\PRWBADBPGD.sqlite",
    "Sources": [
      "C:\\Users\\Public\\Downloads\\",
      "C:\\Users\\TestAccount\\Desktop\\Downloads\\"
    ],
    "Settings": [
      {
        "Filter": "",
        "Name": "encryption-module",
        "Value": "",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "compression-module",
        "Value": "zip",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "dblock-size",
        "Value": "50mb",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "--no-encryption",
        "Value": "true",
        "Argument": null
      }
    ],
    "Filters": [],
    "Metadata": {
      "LastBackupDate": "20200630T162909Z",
      "BackupListCount": "2",
      "TotalQuotaSpace": "5994633494528",
      "FreeQuotaSpace": "1910532800512",
      "AssignedQuotaSpace": "-1",
      "TargetFilesSize": "22927657",
      "TargetFilesCount": "6",
      "TargetSizeString": "21.87 MB",
      "SourceFilesSize": "23928668",
      "SourceFilesCount": "3",
      "SourceSizeString": "22.82 MB",
      "LastBackupStarted": "20200630T162909Z",
      "LastBackupFinished": "20200630T162911Z",
      "LastBackupDuration": "00:00:02.2975089",
      "LastCompactDuration": "00:00:00.0312446",
      "LastCompactStarted": "20200630T162656Z",
      "LastCompactFinished": "20200630T162656Z"
    },
    "IsTemporary": false
  },
  "DisplayNames": {
    "C:\\Users\\Public\\Downloads\\": "Downloads",
    "C:\\Users\\TestAccount\\Desktop\\Downloads\\": "Downloads"
  }
}

There is another thread reporting the same problem here: Working NAS folder suddenly not accessible - Duplicati thinks it does not exist

I dont have this setup but could someone try using the IP Address rather then the dns name. Seems to be DNS issues as well with this update
eg set destination to
\192.168.1.1\sharename

I tried that, as well as the hosts file addition, and neither of those made a difference.

This probably needs narrowing down or finding better info on the failure.

Windows appears to put Connectivity events in event log below, which you can view as an Administrator:

Windows Logs --> Applications and Services Logs --> Microsoft --> Windows --> SMBClient
You can look at all the logs there to look for any information on the error.

If you have a different SMB server (even Windows), does it work better?

Because this appears sensitive to the account, testing it as SYSTEM in a human-friendly way might help.

PsExec run from an Administrator account will let you run many things as SYSTEM, but not File Explorer.

Something like psexec -s -i cmd.exe runs Command Prompt. Run whoami to verifyy system account.
From there you see if things like net use work, and if they don’t, do they (or event log) report their issues?

powershell.exe is reported to do UNC well, unlike cmd.exe, so maybe try something like this as SYSTEM:
Get-ChildItem <UNC path>

I may have a work around for this.
Tested on Windows 10 2004 to Centos 6 systems. Samba 3.6.1 with SMB1 disabled and using SMB2

As suggested when running net use under system with psexec no joy in creating the share. Ran a wire shark trace noticed that the username was not been populated on the NTLM Auth response

Entered the full user name as HOSTNAME\User and it worked. Tried the same in Duplicati and it then came back with a successful test connection.

2 Likes

That worked for me.

Duplicati machine is Win 10 Pro 2004, target is a Debian server running SMB2. I stopped the service, went to properties and switched it to Local System, applied the changes, and ran the service. I verified in Task Manager that it was running under the system account. Then I edited the credentials from just “user1” to “DEBIANSERVERHOSTNAME\user1”, and it worked.

Might be good to clarify the help tip in the UI to advise users to try hostname\username format in the credentials.

Thank you for your help!

SERVERNAME\user works for me also! Thanks