[HOWTO] Update samba (to 3.6.25) using Entware-ng

Marvell Kirkwood based
Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by Mijzelf » Sun Jan 07, 2018 8:08 pm

Have you already tried to access the NAS by IP instead of name?

darzur
Posts: 9
Joined: Mon Dec 22, 2014 6:55 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by darzur » Thu Jan 11, 2018 5:30 pm

Hi,

Just installed this update and it seems to be mostly working. W10 reports "Dialect 2.0.2" so although I don't know how to check if it's 3.6.25 it's updated. My problem is that I can't access my shares where I have Recycle Bin enabled. I mean "vfs objects = recycle" that is configured as follows:

Code: Select all

vfs objects = recycle
	 recycle:repository = /i-data/f918fac3/Kosz
	 recycle:exclude = .test.permission.file.*
	 recycle:directory_mode = 0777
	 recycle:subdir_mode = 0777
	 recycle:keeptree = yes
	 recycle:versions = yes
	 recycle:touch = yes
	 recycle:touch_mtime = no
	 recycle:maxsize = 0
It works perfectly well for firmware SAMBA but here for some reason it isn't. Is there any way to enable it?

velqn
Posts: 3
Joined: Thu Jan 25, 2018 10:44 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by velqn » Thu Jan 25, 2018 10:47 am

Hello guys,

performed all the steps, but still smbd -V is 3.5.6

root@NSA325-v2:/opt/bin# ./opkg update
Downloading http://pkg.entware.net/binaries/armv5/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/packages
Downloading http://downloads.zyxel.nas-central.org/ ... ackages.gz
Updated list of available packages in /opt/var/opkg-lists/Mijzelf
root@NSA325-v2:/opt/bin# ./opkg install zyxel-samba-replacement
Package zyxel-samba-replacement (3.6.25) installed in root is up to date.
root@NSA325-v2:/opt/bin# chmod a-x /opt/etc/init.d/S08samba
root@NSA325-v2:/opt/bin# /opt/etc/init.d/S09ZyXELSambaReplacement start
Stopping Samba daemons: nmbd smbd.
root@NSA325-v2:/opt/bin# smbd -V
Version 3.5.6
root@NSA325-v2:/opt/bin# /opt/etc/init.d/S09ZyXELSambaReplacement stop
Starting Samba daemons: nmbd smbd.
root@NSA325-v2:/opt/bin# smbd -V
Version 3.5.6

I am not sure why the 3.6.25 is not installed, what am I missing?

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by Mijzelf » Thu Jan 25, 2018 11:51 am

'smbd -V' shows the version of the called smbd, not necessarily the version of the running smbd. You can see which smbd you are calling by executing 'which smbd'.

velqn
Posts: 3
Joined: Thu Jan 25, 2018 10:44 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by velqn » Thu Jan 25, 2018 11:55 am

Thanks Mijzelf,

seems that`s the one running. Should stop it and start the newer one I guess, thought the script would do it.

root@NSA325-v2:/# which smbd
/usr/sbin/smbd

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by Mijzelf » Thu Jan 25, 2018 6:40 pm

velqn wrote:seems that`s the one running. Should stop it and start the newer one I guess, thought the script would do it.

root@NSA325-v2:/# which smbd
/usr/sbin/smbd
The script is supposed to do so. 'which smbd' tells you which smbd is started from the command line, not which smdb is actually running.
To see which is running, execute

ps | grep smbd

velqn
Posts: 3
Joined: Thu Jan 25, 2018 10:44 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by velqn » Fri Jan 26, 2018 12:28 pm

Mijzelf wrote:
velqn wrote:seems that`s the one running. Should stop it and start the newer one I guess, thought the script would do it.

root@NSA325-v2:/# which smbd
/usr/sbin/smbd
The script is supposed to do so. 'which smbd' tells you which smbd is started from the command line, not which smdb is actually running.
To see which is running, execute

ps | grep smbd
For some reason ps does not return anything when I grep for smbd, but I know it`s running... it runs on my libreelec box and on my NAS, but look below:

LibreELEC:~ # ps | grep smbd
412 root 0:00 /usr/sbin/smbd
418 root 0:00 {smbd-notifyd} /usr/sbin/smbd
420 root 0:00 {cleanupd} /usr/sbin/smbd
427 root 0:00 {lpqd} /usr/sbin/smbd
607 root 0:00 grep smbd
LibreELEC:~ # ssh nas
***@nas's password:
== Welcome at FFP version 0.7/arm, running on NSA325v2 NSA325-v2, firmware V4.81 (AALS.1) ==
***@NSA325-v2:~# ps | grep smbd
***@NSA325-v2:~#


update: tnx to Philip! Stopped FFP, rebooted and installed via opkg.

dobosz23
Posts: 9
Joined: Sun Dec 17, 2017 3:47 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by dobosz23 » Sat Mar 10, 2018 10:44 pm

Hello,

When I update opkg and install new samba-server then no working on ZyXELSambaReplacement. I look for other version on Samba and find barmalej2 on FFP, but script to run samba not working, so I change for ZyXELSambaReplacement to run /ffp/opt/sbin/... and work. When I run samba -V there is 3.6.25.

JDD
Posts: 105
Joined: Fri Jan 20, 2012 1:55 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by JDD » Mon Mar 19, 2018 8:53 pm

Just working on getting my NSA320 (NAS320) also on Samba 3.6.25.

Thanks, Mijzelf, for the Zyxel replacement script.

Just status for now:
- When installed the samba server, also S08samba is in /opt/etc/init.d (eXecute rights).
Some issues found, smbd would not start.

After removing S08, and (hope temp.) removing the recycle bins from the conf file, all seems to work perfectly.
Going to run for couple of days, then try to get the recycle back.
NSA320 FW V4.70(AFO.3) Entware-ng (previous FFP 0.7 on usb )
NAS326 with Entware-ng
Bunch of USB 2 & 3 external disks connected to nas.

JDD
Posts: 105
Joined: Fri Jan 20, 2012 1:55 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by JDD » Wed Mar 21, 2018 8:17 pm

Hi All,

Just tried to startup the recycle bin again on nsa320, with 3.6.25 samba.

Error getting from smbd:
Probing module 'recycle'
Probing module 'recycle': Trying to load from /opt/lib/vfs/recycle.so
Error loading module '/opt/lib/vfs/recycle.so': /opt/lib/vfs/recycle.so: undefined symbol: DEBUGLEVEL_CLASS
error probing vfs module 'recycle': NT code 0xc0000001
smbd_vfs_init: vfs_init_custom failed for recycle
vfs_init failed for service personal (is share on NAS320)
setting sec ctx (504, 500) - sec_ctx_stack_ndx = 0


First to find library which covers the DEBUGLEVEL_CLASS.
Should normally be found within the path via the env.
...
LD_LIBRARY_PATH=/usr/local/zy-pkgs/lib
...
PATH=/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/zyxel/sbin:/usr/local/zy-pkgs/bin:/zyxel/htp

If you have any ideas, please add.....
NSA320 FW V4.70(AFO.3) Entware-ng (previous FFP 0.7 on usb )
NAS326 with Entware-ng
Bunch of USB 2 & 3 external disks connected to nas.

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by barmalej2 » Wed Mar 21, 2018 9:28 pm

This issue can't be solved neither using LD_LIBRARY_PATH neither PATH variables. Recompilation of source code with appropriate patch or LDFLAGS is the only one solution.

JDD
Posts: 105
Joined: Fri Jan 20, 2012 1:55 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by JDD » Wed Mar 21, 2018 9:42 pm

Just an update: thinking outlout.
The recycle.so is an vfs module, which should be included into the samba 3.6.25.
I could not find any recycle.so file for samba 3.6.25.

Q1 Maybe a source could be found, to compile it for this samba version.
Q2 If a source is found, how to compile it on/for the zyxel nas.
NSA320 FW V4.70(AFO.3) Entware-ng (previous FFP 0.7 on usb )
NAS326 with Entware-ng
Bunch of USB 2 & 3 external disks connected to nas.

JDD
Posts: 105
Joined: Fri Jan 20, 2012 1:55 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by JDD » Wed Mar 21, 2018 9:58 pm

Found the sources on https://download.samba.org/pub/samba/st ... .25.tar.gz
( date is 2015-02-23, probably the latest sec.issues not included ? )

The file vfs_recycle.c is in there.

Now this has to be compiled for the NSA320. Never done that.

Can anybody advise ?
NSA320 FW V4.70(AFO.3) Entware-ng (previous FFP 0.7 on usb )
NAS326 with Entware-ng
Bunch of USB 2 & 3 external disks connected to nas.

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by barmalej2 » Thu Mar 22, 2018 11:44 am

Just recompilation will not help you. This task requires experience and knowledge, besides your source doesn't includes security patches.
Ask Mijzelf to do this.

JDD
Posts: 105
Joined: Fri Jan 20, 2012 1:55 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by JDD » Fri Mar 23, 2018 6:26 pm

Hi Mijzelf,

Could you include the security pathces and compile this for the NSA320 ?

Many thanks,
NSA320 FW V4.70(AFO.3) Entware-ng (previous FFP 0.7 on usb )
NAS326 with Entware-ng
Bunch of USB 2 & 3 external disks connected to nas.

Post Reply