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.
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
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.
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.