Can't install SMB V2 on NSA325

24

All Replies

  • I admit I have trouble understanding how it works, but here is the result of the commands :
    ~ # /opt/etc/init.d/S09ZyXELSambaReplacement stop
    sh: can't kill pid 17424: No such process
    sh: can't kill pid 17427: No such process
    Starting Samba daemons: nmbd smbd.
    ~ # /opt/etc/init.d/S09ZyXELSambaReplacement start
    Stopping Samba daemons: nmbd smbd.
    ~ # /bin/sh -x /etc/init.d/samba.sh start
    + prgmname1=/opt/sbin/nmbd
    + prgmname2=/opt/sbin/smbd
    + configfile=/opt/etc/samba/ZyXELSambaReplacement.conf
    + nmbdpid=/opt/var/run/nmbd-ZyXELSambaReplacement.conf.pid
    + smbdpid=/opt/var/run/smbd-ZyXELSambaReplacement.conf.pid
    + basename /etc/init.d/samba.sh
    + [ samba.sh = samba.sh ]
    + start
    + /opt/sbin/nmbd -D -s /opt/etc/samba/ZyXELSambaReplacement.conf
    + logger -t nmbd started /opt/sbin/nmbd, conf: /opt/etc/samba/ZyXELSambaReplacement.conf
    + /opt/sbin/smbd -D -s /opt/etc/samba/ZyXELSambaReplacement.conf
    + logger -t smbd started /opt/sbin/smbd, conf: /opt/etc/samba/ZyXELSambaReplacement.conf
    + return 0
    + exit
    ~ #




  • Mijzelf
    Mijzelf Posts: 2,793  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    That looks also good. I *think* the pid files already exist, which makes samba refuse to start. You could try to start it manually, without daemonizing, to see if it spits any errors:
    /opt/sbin/smbd -s /opt/etc/samba/ZyXELSambaReplacement.conf

    A word on pid files: pid files are files in which background daemons write their ProcessIdentifier, a number which represents the process. And they remove the file when the daemon stops. It has two functions: the existence of the file shows the daemon is running, the content of the file gives you an handle to send signals to the daemon.
    There was a time pid files were written to /var/run/. (Nowadays it is /run, but /var/run is a symlink to it). /var/run or /run is normally a ramdisk. That makes it blazing fast, but it also means the directory is empty on boot. No dangling pid files.
    Entware is installed in /opt. and all of it's software is configured to put /opt for all the 'default paths'. So the pid files are in /opt/var/run/, and the configution can be found in /opt/etc/.
    But the Entware installer did not mount a ramdrive on /opt/var/run, which means it's content can survive a reboot.

    By default samba uses the pid files /var/run/smbd.pid and /var/run/nmbd.pid. But when you use a non-standard configuration file that filename is added, that's why this smbd uses /opt/var/run/smbd-ZyXELSambaReplacement.conf.pid. (The different filename is needed because you could run several instances with different configuration simultaneously.)

    So when the pid file already exists on start, the daemon refuses to start. But it can't tell you, because it's running in background, and logging is disabled.

    Have a look in /opt/var/run/

  • TonyRambo
    TonyRambo Posts: 9
    First Comment First Anniversary
    edited February 2023
    Thanks for the explanation Mijzelf.

    When I run the command /opt/sbin/smbd -s /opt/etc/samba/ZyXELSambaReplacement.conf, I don't get any error.

    Here is the content of :
    - /opt/var/run/ :
    -rw-r--r--    1 root     root             6 Jan 18 00:54 nmbd-ZyXELSambaReplacement.conf.pid
    -rw-r--r--    1 root     root             6 Jan 18 00:54 smbd-ZyXELSambaReplacement.conf.pid

    - /var/run (/run does not exist in the root) :

    -rw-rw-rw-    1 root     root             6 Feb 18 06:23 crond.pid
    -rw-rw-rw-    1 root     root            36 Feb 15 18:21 dmsf.pid
    -rw-r--r--    1 root     root             5 Feb 15 18:21 httpd.pid
    -rw-r--r--    1 root     root             5 Feb 15 18:21 inetd.pid
    -rw-r--r--    1 root     root             5 Feb 15 18:21 lld2d-egiga0.pid
    -rw-rw-rw-    1 root     root             5 Feb 15 18:21 mediaserver.pid
    lrwxrwxrwx    1 root     root            48 Feb 16 03:37 nmbd.pid -> /opt/var/run/nmbd-ZyXELSambaReplacement.conf.pid
    -rw-r--r--    1 root     root             5 Feb 15 18:21 pure-ftpd.pid
    -rw-rw-rw-    1 root     root             6 Feb 18 06:23 sch_controller.pid
    lrwxrwxrwx    1 root     root            48 Feb 16 03:37 smbd.pid -> /opt/var/run/smbd-ZyXELSambaReplacement.conf.pid
    -rw-------    1 root     root             4 Feb 15 18:21 syslog-ng.pid
    -rw-r--r--    1 root     root             4 Feb 15 18:20 uamd.pid
    -rw-r--r--    1 root     root           384 Feb 18 17:14 utmp
    -rw-r--r--    1 root     root             4 Feb 15 18:20 zylogd.pid
    -rw-rw-rw-    1 root     root             4 Feb 15 18:21 zypkg_download.pid
    Despite your detailed explanation, I still don't understand why samba does not work any more.

    EDIT : Well, I saw that I had access to https://metarepository.tk/ again, I tried a reinstall of Entware, and I see that it doesn't work anymore, so I just made the problem worse, I'm a genius...

    EDIT² : apparently this is again a problem with the http/https :
    [18:24:36]     --18:24:36--  http://metarepository.tk/Users/Mijzelf/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24
    [18:24:36]     => `/opt/lib/ld-2.22.so'
    [18:24:36]     Resolving metarepository.tk... 158.101.164.98
    [18:24:36]     Connecting to metarepository.tk[158.101.164.98]:80... connected.
    [18:24:36]     HTTP request sent, awaiting response... 301 Moved Permanently
    [18:24:36]     Location: https://metarepository.tk/Users/Mijzelf/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24 [following]
    [18:24:36]     --18:24:36--  https://metarepository.tk/Users/Mijzelf/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24
    [18:24:36]     => `/opt/lib/ld-2.22.so'
    [18:24:36]     Connecting to metarepository.tk[158.101.164.98]:443... connected.
    [18:24:36]     
    [18:24:36]     Unable to establish SSL connection.
    [18:24:36]     
    [18:24:36]     Unable to establish SSL connection.






  • Mijzelf
    Mijzelf Posts: 2,793  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    -rw-r--r--    1 root     root             6 Jan 18 00:54 nmbd-ZyXELSambaReplacement.conf.pid

    And here is the problem. The pid file shouldn't live longer than the daemon. This is a stale file, and it's not on a ramdisk, unless you didn't reboot since 6 jan.

    Remove the directory and create a symlink:

    rm -rf /opt/var/run

    ln -s /tmp /opt/var/run

    apparently this is again a problem with the http/https
    It looks like @shv is setting up the server again, but is not yet finished. It might help if you try to install from metarepo.tk, as the certicificate offered by metarepository.tk is for metarepo.tk, which also works. Yet it is possible the used encryption isn't supported by the old wget anymore.
  • TonyRambo
    TonyRambo Posts: 9
    First Comment First Anniversary
    edited February 2023
    unless you didn't reboot since 6 jan.
    I performed a restart of the NSA not later than yesterday, unfortunately, I could not test the commands, as the problem with http still exists despite the change of address :
    [19:33:21]     --19:33:21--  http://metarepo.tk/Users/Mijzelf/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24
    [19:33:21]     => `/opt/lib/ld-2.22.so'
    [19:33:21]     Resolving metarepo.tk... 158.101.164.98
    [19:33:21]     Connecting to metarepo.tk[158.101.164.98]:80... connected.
    [19:33:21]     HTTP request sent, awaiting response... 301 Moved Permanently
    [19:33:21]     Location: https://metarepo.tk/Users/Mijzelf/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24 [following]
    [19:33:21]     --19:33:21--  https://metarepo.tk/Users/Mijzelf/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24
    [19:33:21]     => `/opt/lib/ld-2.22.so'
    [19:33:21]     Connecting to metarepo.tk[158.101.164.98]:443... connected.
    [19:33:21]     
    [19:33:21]     Unable to establish SSL connection.
    [19:33:21]     
    [19:33:21]     Unable to establish SSL connection.
    Yet it is possible the used encryption isn't supported by the old wget anymore.
    Does this mean that I could no longer reinstall your version of Entware?
  • Mijzelf
    Mijzelf Posts: 2,793  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    Does this mean that I could no longer reinstall your version of Entware?
    Not today and/or not from this server. The firmware wget is simply too old to connect to nowadays https. So the http->https redirect on the server has to be switched off, to use MetaRepository and Entware.
    But @shv is still busy setting up the server, in his spare time, so let's give him some time.
  • BSB
    BSB Posts: 12
    First Comment Friend Collector

    Is there tutorial on how to do this?

    I don't get where you get the files from and how and what you access to start the process?

  • Mijzelf
    Mijzelf Posts: 2,793  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary

    At the moment the DNS is down, but there is a brief instruction on the forum at metarepo.tk.

  • BSB
    BSB Posts: 12
    First Comment Friend Collector

    Is it still down?

    I can't also connect to that forum?

  • Mijzelf
    Mijzelf Posts: 2,793  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary

    The DNS still doesn't resolve. You can reach the forum at https://zyxel.diskstation.eu/forum/viewtopic.php?t=24, but your browser will whine that it's unsafe. The forum uses a metarepo.tk certificate.

Consumer Product Help Center