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

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

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

Post by Mijzelf » Sat Mar 24, 2018 8:07 am

I can tell you how you can do it yourself. Entware-ng is based on the OpenWRT buildroot, which means that everything is cross compiled. I think you need a Linux or Ubuntu box (my Mageia box gives errors), and follow the recipe here. After the step

Code: Select all

make package/symlinks
you'll have the makefiles for all packages in the packages directory. These makefiles also contain the commandline arguments provided with configure. So read the Samba documentation how to include the recyclebin, and edit the makefile.
After the copying of the .config file, you can run 'make menuconfig' to exclude most of the packages. The compilation will take a lot of time, as it will also build the crosscompiler environment.

The generated package will not contain the needed recyclebin plugin, as the makefile also lists which files should be included in the package. But it's somewhere in your build directory, and the generated package is compatible.

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 » Tue Mar 27, 2018 7:31 pm

Hi Mijzelf,

Thanks for your advice.

Hard challenge for me without any experience on compiling for linux. But will learn.
Currently I have only the Nas's on linux, so that will be the first item to solve.

Will take time, but also will try to post progress here from time to time.
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.

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

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

Post by Mijzelf » Wed Mar 28, 2018 7:09 pm

JDD wrote:Currently I have only the Nas's on linux, so that will be the first item to solve.
If you have a decent PC/laptop with enough diskspace, you can install it in a virtual machine, like VirtualBox.

stagger321
Posts: 58
Joined: Fri Feb 08, 2013 2:52 pm

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

Post by stagger321 » Fri Jun 15, 2018 7:08 am

Hi

Sorry for updating an old thread, but my smbd daemon is not starting on my NSA325 - and I really need help to access my NSA on my win10 desktop.

I have followed the instructions and have loaded MetaRepostory, and the Entware-ng.
I have followed the instructions to load 3.6.25, and have rebooted the NSA325

When I check smbd in ps - there are no smbd daemons running.
If I 'S09ZyXELSambaReplacement stop' I get old SMB1 daemons running. But a restart of that script gives me nothing, as below:

Code: Select all

/usr/local/zy-pkgs/opt/etc/init.d #
/usr/local/zy-pkgs/opt/etc/init.d # ps |grep smbd
/usr/local/zy-pkgs/opt/etc/init.d # /opt/etc/init.d/S09ZyXELSambaReplacement start
/usr/local/zy-pkgs/opt/etc/init.d # /opt/etc/init.d/S09ZyXELSambaReplacement stop
sh: can't kill pid 4452: No such process
sh: can't kill pid 4455: No such process
Starting Samba daemons: nmbd smbd.
/usr/local/zy-pkgs/opt/etc/init.d # ps |grep smbd
11065 root     13804 S N  /usr/sbin/smbd -D
11067 root     13804 S N  /usr/sbin/smbd -D
/usr/local/zy-pkgs/opt/etc/init.d # /opt/etc/init.d/S09ZyXELSambaReplacement start
Stopping Samba daemons: nmbd smbd.
/usr/local/zy-pkgs/opt/etc/init.d # ps |grep smbd
/usr/local/zy-pkgs/opt/etc/init.d #
Really appreciate some help here :?
Thanks
Cheers

Stagger

NSA325_4.80(AAAJ.0), FFP 0.7, [2 x 2TB WD Caviar Greens (WD20EZRX) - RAID1]

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

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

Post by Mijzelf » Fri Jun 15, 2018 8:40 am

Have a look in the logs, in /opt/var/log/

stagger321
Posts: 58
Joined: Fri Feb 08, 2013 2:52 pm

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

Post by stagger321 » Fri Jun 15, 2018 9:04 am

Hi Mijzelf

Did have a look there, but don't understand whats going on.
the old (SMB1??) daemons stop, but nothing happens for the SMB2 daemons.
List of log files are below. and tail of the two nmbd and smbd files
Logs says the 3.6.25 started, but 'ps | grep smbd' says otherwise.

Code: Select all

/usr/local/zy-pkgs/opt/var/log # ls -al
drwxr-xr-x    2 root     root          4096 Jun 15 09:47 .
drwxr-xr-x    6 root     root          4096 Jan  4 08:53 ..
-rw-r--r--    1 root     root           573 Jun 15 07:19 Entware-ng.log
-rw-r--r--    1 root     root           258 Jun 15 07:19 Entware-ng.log.1.gz
-rw-r--r--    1 root     root          2197 Jun 15 06:51 Entware-ng.log.2.gz
-rw-r--r--    1 root     root          2298 Jun 13 12:53 Entware-ng.log.3.gz
-rw-r--r--    1 root     root          6242 Jun 15 09:38 log.nmbd
-rw-r--r--    1 root     root         40343 Jun 15 09:37 log.smbd

Code: Select all

/usr/local/zy-pkgs/opt/var/log # tail -20  log.smbd
[2018/06/15 08:53:48,  0] (handle_dos_charset)
  ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) ASCII instead.
[2018/06/15 08:53:48.613257,  0] (handle_dos_charset)
  ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) ASCII instead.
[2018/06/15 08:53:48.633828,  0] (pidfile_create)
  ERROR: can't open /opt/var/run/smbd-ZyXELSambaReplacement.conf.pid: Error was File exists
[2018/06/15 09:37:43,  0] (smbd_main)
  smbd version 3.6.25 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2018/06/15 09:37:43,  0] (smbd_main)
  error opening config file
[2018/06/15 09:51:17,  0] (smbd_main)
  smbd version 3.6.25 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2018/06/15 09:51:17,  0] (handle_dos_charset)
  ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) ASCII instead.
[2018/06/15 09:51:17.895946,  0] (handle_dos_charset)
  ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) ASCII instead.
[2018/06/15 09:51:17.916406,  0] (pidfile_create)
  ERROR: can't open /opt/var/run/smbd-ZyXELSambaReplacement.conf.pid: Error was File exists

Code: Select all

/usr/local/zy-pkgs/opt/var/log # tail -20 log.nmbd
[2018/06/15 09:37:29,  0] (pidfile_create)
  ERROR: can't open /opt/var/run/nmbd-ZyXELSambaReplacement.conf.pid: Error was File exists
[2018/06/15 09:38:03,  0] (nmbd_main)
  nmbd version 3.6.25 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2018/06/15 09:38:03,  0] (handle_dos_charset)
  ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) ASCII instead.
[2018/06/15 09:38:03,  0] (handle_dos_charset)
  ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) ASCII instead.
[2018/06/15 09:38:03,  0] (pidfile_create)
  ERROR: can't open /opt/var/run/nmbd-ZyXELSambaReplacement.conf.pid: Error was File exists
[2018/06/15 09:51:17,  0] (nmbd_main)
  nmbd version 3.6.25 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2018/06/15 09:51:17,  0] (handle_dos_charset)
  ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) ASCII instead.
[2018/06/15 09:51:17,  0] (handle_dos_charset)
  ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) ASCII instead.
[2018/06/15 09:51:17,  0] (pidfile_create)
  ERROR: can't open /opt/var/run/nmbd-ZyXELSambaReplacement.conf.pid: Error was File exists
Cheers

Stagger

NSA325_4.80(AAAJ.0), FFP 0.7, [2 x 2TB WD Caviar Greens (WD20EZRX) - RAID1]

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

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

Post by Mijzelf » Fri Jun 15, 2018 10:15 am

Can you delete

/opt/var/log/log.smbd
/opt/var/log/log.nmbd
/opt/var/run/smbd-ZyXELSambaReplacement.conf.pid
/opt/var/run/nmbd-ZyXELSambaReplacement.conf.pid

and try to start it again?

stagger321
Posts: 58
Joined: Fri Feb 08, 2013 2:52 pm

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

Post by stagger321 » Mon Jun 18, 2018 6:25 am

Thanks Mijzelf.

That seems to have allowed me to get a smbd daemon on boot.

Code: Select all

~ $  ps|grep smbd
24853 root      5228 S <  /opt/sbin/smbd -D -s /opt/etc/samba/ZyXELSambaReplacement.conf
I have not really been able to check this with a windows mapped drive, as I have other issues with RAID disk expansion to 4TB, but will open another thread on that subject.

Many thanks.
Cheers

Stagger

NSA325_4.80(AAAJ.0), FFP 0.7, [2 x 2TB WD Caviar Greens (WD20EZRX) - RAID1]

betablack74
Posts: 4
Joined: Fri Jul 20, 2018 7:44 am

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

Post by betablack74 » Fri Jul 20, 2018 8:06 am

Hi

thank you really so much for this post on how update the SMB version on the Zyxel 325. Really helpful !!!

Just a little note:
on my device (325v2) after the install of the Entware-ng pkg, the installer "opkg" was not reachable from root "/".
It was necessary to call it with the full path were it was installed:
/usr/local/zy-pkgs/opt/bin/opkg

So that, everything goes fine thanks !!!

=================================================================

-- The tale before ... --

I used with lot of satisfaction the device 325 with SMBv1 until the may 2017, when explosed the related security issue.
After that lots of patches and security enforcement was released so that on my laptop was enabled the SMBv2 and was impossible to roll back to v1 also due to my company policies.
I contacted some times the Zyxel support team in order to known if it possiple to enable the v2 on that device, or obtain a new FW release which add it, but they replied every time that the SMBv2 on that device is not supported and also is not planned to add it in future FW releases (strange customer oriented point of view in my mind ...).
And they never told me about this simple way to achieve the goal.
So I used very poorly my device for one year, with lot of limitations.
I was thinking to try to hack it or replace with another one recent model for a long time... till now !
Tnx again well done !!

=================================================================

raven66
Posts: 3
Joined: Wed Jul 18, 2018 8:01 pm

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

Post by raven66 » Mon Jul 23, 2018 9:36 pm

Ummmm, a little help, please?

Code: Select all

workxit@Zenbook-UX410:~$ sudo ssh 192.168.1.5

BusyBox v1.17.2 (2017-06-23 10:40:08 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@NSA325:~# 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/Users/Mijzelf/Entware-ng/binaries/armv5/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/Mijzelf
root@NSA325:~# opkg install zyxel-samba-replacement
Installing zyxel-samba-replacement (3.6.25) to root...
Downloading http://downloads.zyxel.nas-central.org/Users/Mijzelf/Entware-ng/binaries/armv5/zyxel-samba-replacement_3.6.25_all.ipk
Installing samba36-server (3.6.25-9) to root...
Downloading http://pkg.entware.net/binaries/armv5/samba36-server_3.6.25-9_armv5soft.ipk
Configuring samba36-server.
Configuring zyxel-samba-replacement.
root@NSA325:~# chmod a-x /opt/etc/init.d/S08samba
root@NSA325:~# /opt/etc/init.d/S09ZyXELSambaReplacement start
Stopping Samba daemons: nmbd smbd.
mv: can't rename '/opt/var/lock/*': No such file or directory
root@NSA325:~# 

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

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

Post by Mijzelf » Tue Jul 24, 2018 12:29 pm

That is normal behaviour. The 'Stopping Samba daemons: nmbd smbd.' are the firmware daemons. The starting of the Entware-ng daemons is silent. Guess I should add some prints to the startscript to make it less confusing.

The 'mv: can't rename '/opt/var/lock/*': No such file or directory' is a one-timer. By default the lock directory of Entware-ng is on harddisk. But it turns out that will keep the disk awake. So the directory is exchanged by a symlink to /var/lock, which is on a ramdrive. But before doing so, the script moves the content of /opt/var/lock/ to /var/lock/. This error is what you get if the directory is empty.

martimus
Posts: 2
Joined: Tue Jul 24, 2018 9:43 pm

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

Post by martimus » Tue Jul 24, 2018 9:52 pm

I want to update my NSA-325 to SMB2. Therefore I've installed and activated the MetaRepository package and restarted the NAS.
I didn't know how to open a shell on my NSA-325, so the best idea I had was to use putty to open a telnet session and logon as root.
Unfortunately when I enter opkg update I get an error saying the opkg is not known. Did I misss something?

Code: Select all

NSA325-v2 login: root
Password:

BusyBox v1.17.2 (2017-06-23 10:40:08 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # opkg update
-sh: opkg: not found
~ #


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

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

Post by Mijzelf » Wed Jul 25, 2018 7:45 am

Second line in the startpost: Install Entware-ng

martimus
Posts: 2
Joined: Tue Jul 24, 2018 9:43 pm

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

Post by martimus » Fri Jul 27, 2018 11:35 am

Mijzelf wrote:
Wed Jul 25, 2018 7:45 am
Second line in the startpost: Install Entware-ng
My mistake :-) Thank you for the hint!

betablack74
Posts: 4
Joined: Fri Jul 20, 2018 7:44 am

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

Post by betablack74 » Tue Jul 31, 2018 10:26 am

Hi

see my previous post :
"... use the full path of the binary file: /usr/local/zy-pkgs/opt/bin/opkg "

Regards
I.

Post Reply