SMB Share working in Windows but not RClone

What is the problem you are having with rclone?

I can connect fine as a normal SMB share in Windows but not with RCLONE

Run the command 'rclone version' and share the full output of the command.

rclone v1.67.0

  • os/version: Microsoft Windows 11 Pro 22H2 (64 bit)
  • os/kernel: 10.0.22621.3737 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.22.4
  • go/linking: static
  • go/tags: cmount

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> YES

Which cloud storage system are you using? (eg Google Drive)

SMB

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone --vfs-cache-mode full mount AFS_SMB:itt-test-afs H:

The rclone config contents with secrets removed.

[AFS_SMB]
type = smb
host = 10.0.99.6
user = ittstoragetest
pass = tI USED THE rclone OBSCURE PASSWORD COMMAND
domain = localhost

A log from the command with the -vv flag

2024/08/15 10:03:22 DEBUG : pacer: low level retry 8/10 (error couldn't connect SMB: response error: The attempted logon is invalid. This is either due to a bad username or authentication information.)

CLICK IMAGE Working Fine as Normal Windows SMB Share. Showing rclone error

welcome to the forum,

without using rclone, can you access the smb share?

check out my howto guide about smb/samba
https://forum.rclone.org/t/how-to-access-smb-samba-with-rclone/42754

better to test using a simple command, instead of rclone mount

can you please post the full output of rclone lsd AFS_SMB: -vv

1 Like

Thanks for the prompt response. See my first image native windows SMB access is no issue. I sure can access the samba share natively and your suggestion rclone ls z:\ works for me (its lists the items in the share). However, my aim is to mount the share as a native windows disk. So, what are next steps to do this ?

  1. re-create the remote using rclone config
  2. do not use domain = localhost

and then, as i asked in my last post

can you please post the full output of `rclone lsd AFS_SMB: -vv`

domain = localhost is correct for my windows share and the rclone UI forces you to use localhost or enter a different string, any different string will be incorrect. See my image in first post , you can see all my settings for the working SMB PS script and localhost is correct (if not how can I make it blank?).

I think its the obscure PW which is the issue but I have no way of really knowing that is the issue. Can we disable the obscure PW requirement for my testing? Note, my PW string is around 30 chars , could that be an issue for the obscure PW function?

Here is output of the command you suggested . Its the same as my original post:

2024/08/16 03:15:05 DEBUG : pacer: low level retry 4/10 (error couldn't connect SMB: response error: The attempted logon is invalid. This is either due to a bad username or authentication information.)
2024/08/16 03:15:05 DEBUG : pacer: Rate limited, increasing sleep to 1.6s

when using rclone config, type in the real password. do not obscure

not sure that is not correct, see below. i have never used domain, most forum members do not use domain
i guess your setup has a windows/samba domain controller.
tho, a bit confused that the domain name is localhost ?

Option domain.
Domain name for NTLM authentication.
Enter a value of type string. Press Enter for the default (WORKGROUP).
domain>

and here is the working remote, as created by rclone config

Configuration complete.
Options:
- type: smb
- host: 192.168.62.233
- user: administrator
- pass: *** ENCRYPTED ***
rclone lsd vserver03:
          -1 1999-12-31 19:00:00        -1 VBRCatalog
          -1 1999-12-31 19:00:00        -1 agent_en10_ro
          -1 1999-12-31 19:00:00        -1 agent_en10_rw
          -1 1999-12-31 19:00:00        -1 agent_vserver03_ro
          -1 1999-12-31 19:00:00        -1 agent_vserver03_rw
          -1 1999-12-31 19:00:00        -1 br_theserver03_theen10_cdrive
          -1 1999-12-31 19:00:00        -1 falconer.en.calibre
          -1 1999-12-31 19:00:00        -1 falconer.en.data
          -1 1999-12-31 19:00:00        -1 falconer.en.firefox
          -1 1999-12-31 19:00:00        -1 falconer.en.keepass
          -1 1999-12-31 19:00:00        -1 falconer.en.npp
          -1 1999-12-31 19:00:00        -1 falconer.en.tbird
          -1 1999-12-31 19:00:00        -1 falconer.jobs
          -1 1999-12-31 19:00:00        -1 zork
net use \\192.168.62.233\zork /user:administrator redacted
The command completed successfully.

Hi, the command at the end that is windows mount command, as my picture shows mounting in windows is no problem for me. I already tried mounting with full password, it made no difference. I need to mount SMB share as a disk drive. That is my reason for using rclone. You original link is to list files in an Windows SMB share but I need to mount as a drive using the rclone mount command.

localhost --- your response is correct, my bad , the default is workgroup but this still doesnt help us. As you can see the Powershell script clearly shows the UN prefix is localhost\USERNAME . Anyway I changed back to the default, WORKGROUP . It made no difference

I am simply trying to mount an working SMB share as a drive using rclone. How is the net use command which works fine for me helpful in this scenario?

I already tried with full PW , it doesnt work. It clearly states in the user manual when I get to the PW option in the config wizard that obscure is required in the readme.

--smb-pass string SMB password (obscured)

SMB password.

NB Input to this must be obscured - see rclone obscure.

Properties:

  • Config: pass
  • Env Var: RCLONE_SMB_PASS
  • Type: string
  • Required: false

i understand that.
imo, need to get a simple command working, such as rclone lsd, then try complex rclone mount

need to obscure password when using
1.--smb-pass on command line
2. connection strings
3. environment variables.

in some rare cases, rclone can get confused if the password is obscured or not.
as a test, i would

  1. change the password to 11111111.
  2. re-create the remote using rclone config. type the password as is, do not obscure.
  3. rclone lsd

But rclone lsd is simply listing the contents of a Windows SMB share. Are you saying I can rclone mount the windows SMB share that I have mounted as a network drive in windows with NET USE command?

You showed an SMB share of your own , are you able to mount that share with rclone as a drive? At least if it works for you then we know its not just some bug in the rclone SMB protocol.

I am wondering why you even use third party tools (rclone with WinFsp) instead of the native implementation of windows.

net use H: \\10.0.99.6\itt-test-afs /user:ittstoragetest would be the native command for your purpose. Or just use the GUI to map a Netword Drive.

Upon calling the command first you will be asked for the password and it will be saved in the Credential Store (or use cmdkey for that but do not hand over the password in plain text in a script or similar). With PowerShell you can use New-PSDrive. Powershell has the option to save passwords encrypted (check for SecureString).

Because my application requires windows drive not network drive. I am very familiar with net use command and you can see my PS script does exactly what you are suggesting. Thanks for your input but SMB is a supported type in rclone so we are simply trying to prove the feature works and is usable.

There is a chance rclone SMB wont work for your specific SMB server.
It does work for me (couple of connections I use) but it is based on GitHub - hirochachacha/go-smb2: SMB2/3 client library written in Go. which does not look like actively maintained for years so problems are expected:)

set up a symbolic link to access the network share through a location on your local drive:

mklink /d C:\LocalDirectory\ShareName \\Server\ShareName\Directory

OK, thanks, I would like to try this, I need it to have system level access and user level access. If I run this command via task scheduler will application windows services be able to access them ? Its a legacy app that MUST be installed to a local drive / folder with large data store. I dont care about performance just that it works. Of course I need to be able to reboot the server and it just work, no logged in user but I also want to be able to see the drive when a user logs in.

I like the way rclone mounts shares as system drives and it works well on all kinds of cloud native protocols, quite bizarre that good old SMB is such a challenge !

As performance is not priority... I would try:

  1. mount SMB using Windows client (as it is what works)
  2. rclone serve webdav this mount
  3. rclone mount webdav_remote drive:

There are many variations and flavours of this approach:) Maybe a bit cumbersome but should get you what you need.

Great news , its a domain issue and I got it working.

Thanks for all your help

While we are here just wondering... as this is a local SMB share with 1Gbps throughput is VFS cache of any benefit? It seems when I download a file I cannot avoid it caching to the C root first? Note, I am trying to download a 500Gb zip repo, my c drive only has 100Gb space. I tried

Also, how do I run the rclone mount disk command from scratch without having to use the rclone config tool? ie. I want to simply mount my disk with a bat / ps script with all the required info without having to run through the interactive wizard.

In such case no need for VFS if your local disk is slower than your LAN. But if faster then you will see improvement - details depend on your workload.

In addition VFS is not only about speed - it helps to simulate "real" drive. See docs for details. Now if you need it or not also depends on what you use it for.

you run rclone config only once. Then you can use configured remote for e.g. mount at any time.

Windows aspects of mount are actually very well covered in docs:

The docs are great, thanks. I guess these are more nuiances in how to best make it perform as needed.
Thank you kindly for the prompt response. Having to open a terminal and work through a UI is highly undesirable as I need craft a reliable deployment method. I looked at the docs and cannot see a command to simply enter the UN / PW / DOMAIN info as part of the mount command (ie. remove need to use GUI).

Correct, my network drive is significantly faster than my local disk hence, the vfs cache is
actually a hinderence to me.

OK how about simply limiting the cache size to say 30GB? I could make say a small swap drive and set the cache to that? When I left my 500GB repo downloading it simply wiped out my c drive's 100GB space and the download failed!

Note, when I drop the --vfs command I get an error but it still seems to copy the files but then fails at the end with a file is too big for destination! is it anything to worry about ? It seems really unhappy without VFS command !!!
See below:

The service rclone has been started.
2024/08/19 19:29:39 ERROR : BP/BP1.12.0.998DVD1.iso: WriteFileHandle: Truncate: Can't change size without --vfs-cache-mode >= writes
2024/08/19 19:31:24 ERROR : BP/BP1.12.0.998DVD1.iso: WriteFileHandle.Write: can't seek in file without --vfs-cache-mode >= writes
2024/08/19 19:31:25 ERROR : BP/BP1.12.0.998DVD1.iso: WriteFileHandle.Write: can't seek in file without --vfs-cache-mode >= writes
2024/08/19 19:31:26 ERROR : BP/BP1.12.0.998DVD1.iso: WriteFileHandle.Write: can't seek in file without --vfs-cache-mode >= writes
2024/08/19 19:31:26 ERROR : BP/BP1.12.0.998DVD1.iso: WriteFileHandle: Truncate: Can't change size without --vfs-cache-mode >= writes
2024/08/19 19:31:27 ERROR : BP/BP1.12.0.998DVD1.iso: corrupted on transfer
2024/08/19 19:31:27 ERROR : BP/BP1.12.0.998DVD1.iso: WriteFileHandle.New Rcat failed: corrupted on transfer
2024/08/19 19:31:27 ERROR : BP/BP1.12.0.998DVD1.iso: WriteFileHandle.Flush error: corrupted on transfer
2024/08/19 19:31:27 ERROR : IO error: corrupted on transfer

config file is simple text file - you can create it using whatever means you prefer. You only need rclone obscure to generate password which goes into it. All is very easy to script if you do not want to play with rclone config create

Always good idea to keep its size in check. It is soft limit though - rclone might need more if you operate on larger files.