Using ksmbd in windows 10

I'm upgrading from samba to ksmbd (for the first time) because samba4 is too massive in the latest openwrt image and i don't think i can install the old samba3-server package.

After upgrading to ksmbd and getting the configuration right in linux, I notice that while linux can get to all shares and perform writes perfectly, windows 10 can't access any share that requires a username and password but guest shares are working fine. I couldn't find any documentation here on troubleshooting ksmbd and windows 10 and when I search on google, a lot of sites are in chinese. The installed packages and config is below.

Linksys wrt1900acs v1:

kmod-fs-ksmbd - 5.4.154+3.3.9-1
ksmbd-server - 3.4.2-1
ksmbd-utils - 3.4.2-1
luci-app-ksmbd - git-21.295.66827-c592d0a

config globals
        option workgroup 'WORKGROUP'
        option description 'mixer'

config share
        option name 'handouts'
        option path '/mnt/usb/dl'
        option read_only 'yes'
        option guest_ok 'yes'
        option create_mask '0700'
        option dir_mask '0700'
        option hide_dot_files 'no'

config share
        option name 'nightvision'
        option path '/mnt/usb/dl'
        option read_only 'no'
        option users 'immortal'
        option guest_ok 'no'
        option hide_dot_files 'no'
        option create_mask '0700'
        option dir_mask '0700'

To access the shares in windows 10, I simply open up file explorer and type \\$ServerIP and it will show me all the shares. I will then input the user/pass after clicking on a password protected share as I would do with any other samba server.


I also have a windows 10 laptop. I fired it up and it was able to get to all shares perfectly. I rebooted it and tried again and it is getting the same error as my other windows 10 machines now.

\\$share is not accessible. You might not have permission to use this network resource.

I figured it out by just clicking on things to see if something worked.

After enabling Allow legacy (insecure) protocols/authentication and a reboot, my shares started working. It is worth noting I've never used this option in any of my samba configurations (samba36-server or samba4-server) because it says insecure but since this isn't an internet facing device, I can live with this being 'insecure'

Just a note for windows 10 you need to install "wsdd2"
for both samba 3&4 & ksmbd
for the windows service Function Discovery Services to find you router
I will note this is not working correctly on V21.02.1 for me i need to manually restert it after boot

1 Like

Thanks for the note.

I did find that package (installed and rebooted) before I found my solution but I didn't notice any changes at all so I removed it.

Like you mentioned, wsdd2 is for discovery purposes but I've never had any problems discovering my shares on my samba3, samba4, or ksmbd servers. Only permission issues once I tried to access those shares. I may decide to go ahead and install wsdd2 again to prevent any issues in the future however.

By doing so, you have enabled the old and deprecated SMB1 on windows 10. It's weird that it works, because ksmbd doc says that SMB1 is disabled by default.

You'd better try to enable SMB2 or 3 into ksmbd, you'll have better performance and less security holes.

I run OpenWrt on an x64 PC, so I have no space nor performance limitations while using samba4.
I have never tried ksmbd, but I'll have a try using a snapshot for test.

Just installed ksmbd and did some basic settings. No need to activate SMB1 (legacy) to make it works with a win11 client. wsdd2 indeed do its job, the server is seen in the network. Worthy to remember.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.