Fortunately samba is more or less separated from the rest of the firmware, so it's possible to replace it. Entware-ng provides a samba server 3,6,25 for Armv5, which is new enough to support smb2.
I wrote a small package zyxel-samba-replacement, which injects Entware-ng samba into the firmware.
How it works
The firmware samba is started and stopped using the /etc/init.d/samba.sh script. Samba is configured to use /etc/samba/smb.conf as configuration file. When you change some samba settings in the webinterface, smb.conf is updated, and a signal is send to the running samba daemon to reload the configuration.
The zyxel-samba-replacement stops firmware samba by executing '/etc/init.d/samba.sh stop', and then exchanges the script by a symlink to /opt/etc/init.d/S09ZyXELSambaReplacement, and starts Entware-ng samba.
This samba uses /opt/etc/samba/ZyXELSambaReplacement.conf as configuration. This file enables smb2, and then includes /etc/samba/smb.conf. This way the firmware can change configuration without touching our smb2 setting.
How to install
Code: Alles auswählen
su opkg update opkg install zyxel-samba-replacement # will automatically pull the samba server # disable the Entware-ng samba server and script /opt/etc/init.d/S08samba stop chmod a-x /opt/etc/init.d/S08samba # enable and start the replacement script chmod a+x /opt/etc/init.d/S09ZyXELSambaReplacement /opt/etc/init.d/S09ZyXELSambaReplacement start
The recycle bin doesn't work. So disable it on all shares before installing the replacement.