gargoyle icon indicating copy to clipboard operation
gargoyle copied to clipboard

[RFC] Replace samba36

Open obsy opened this issue 4 years ago • 10 comments

IMO should replace the old samba36 with ksmbd. Pros:

  • compatible with windows10
  • smaller size
  • almost same config - requires few changes in scripts
  • samba36 is removed from master

obsy avatar Jun 16 '20 05:06 obsy

Yes it's on my list. Do you have patches to provide for this or just suggesting?

lantis1008 avatar Jun 16 '20 05:06 lantis1008

I have nothing done yet. I played ksmbd in ordinary openwrt images, hence my suggestion.

obsy avatar Jun 16 '20 05:06 obsy

IMO should replace the old samba36 with ksmbd. Pros:

  • compatible with windows10
  • smaller size
  • almost same config - requires few changes in scripts
  • samba36 is removed from master

I would highly suggest migrating from Samba shares to SSHFS (individual users not Gargoyle Firmware, I mean unless you want to https://openwrt.org/docs/guide-user/services/ssh/sshfs.server @lantis1008 and include a badass frontend 😉 ) to save yourself from headaches and issues. https://github.com/billziss-gh/sshfs-win

I'm using the beta of https://github.com/billziss-gh/winfsp/releases on Windows 10 v2004 with no issues.

Works as advertised and can mount specific folders as drive letters, restrict to users, etc. It's also much more secure, due to encryption and when using the new feature, as of last update of this post date, of ssh keys and not use a password. I think Samba is dead due to the complexity and buginess of getting it set up perfectly.

stopspazzing avatar Sep 26 '20 22:09 stopspazzing

I am looking at ksmbd now.

sshfs possibly later. I'll look at whether it is supported by vsftpd initially rather than adding another dependency to openssh.

lantis1008 avatar Jan 02 '21 07:01 lantis1008

@obsy did you want to try out https://github.com/lantis1008/gargoyle/commits/gargoyle_ksmbd

I've only implemented for ipq806x in this example. Both samba36-server and ksmbd-server provide gargoyle-sambapkg, so they both satisfy the needs of plugin-gargoyle-usb-storage-full. I've set them to conflict with each other, so i think if you:

make menuconfig
# Select M - ksmbd-server
# Select N - samba36-server
# Select Y - ksmbd-server

You should get all the required dependencies.

This way we can maintain compatibility with both packages and optionally cutover for now, and do full cutover in the future. I think we are also samba4 compliant, so with a little bit of work that could be supported as well (but it is a very large package and I won't make the effort at this time).

I have not included wsdd2 for now. I'm not sure of its requirement. Seems to be windows related, but it worked fine from Windows 10 for me. Switching from samba36 to ksmbd saved about 600KB from the final image :+1:

lantis1008 avatar Jan 03 '21 01:01 lantis1008

I was thinking about removing samba36, but that's ok too. Samba4 is very large, I don't see any reason to include smb4 into images. Waste of space IMO.

obsy avatar Jan 03 '21 07:01 obsy

We can remove it entirely after some testing and feedback I think. Just want to make sure it works correctly. I only tested it very quickly.

lantis1008 avatar Jan 03 '21 07:01 lantis1008

hey @obsy did you test this and have any further comments? I'm happy to merge it, i just want to make sure it works well

lantis1008 avatar Jan 21 '21 03:01 lantis1008

Sometimes I have to manually restart ksmbd, Windows hasn't seen resources - and I don't know why. IMO ksmbd-server should depends on ksmbd-utils for ksmbd.adduser

obsy avatar Jan 21 '21 07:01 obsy

There's a few comments lately that ksmbd is not very stable on 19.x. It is much better on master, but there's a problem preventing it being backported.

I think I might keep the code for later, and when we move to 21.x we can revisit? Should be minimal work at that point to get it going.

lantis1008 avatar Feb 01 '21 01:02 lantis1008