New mirror for nas-central.org

13567

Comments

  • Diskutant
    Diskutant Posts: 7  Freshman Member
    Hello,

    I just found out about the merge from entware-ng to entware when searching for a way to use a newer samba version on the Zyxel NAS 542.
    On https://github.com/Entware/Entware/wiki it states:
    "See Upgrade from... from right column if you've got working Entware-ng/-3x installation."
    but there are no "Upgrade from" pages.
    So I just tried to install the new entware and try to merge the stuff myself. 

    Now I got some problems:
    1) when I ssh into the NAS I get the error 
    "Could not chdir to home directory /home/shares: No such file or directory"
    before, my homedir was "/i-data/fd19ae31/admin"
    can I change that back?
    I tried to create /home/shares/ but that got removed after restart.

    2) my main reason to do all this was to install a new version of samba.
    I did "opkg install samba4-server" 

    I restarted the NAS and "which smbd" shows 
    /opt/sbin/smbd

    but in top and ps I see the old "/usr/sbin/smbd" running instead.

    /opt/sbin/smbd -V
    Version 4.12.5

    /usr/sbin/smbd -V
    Version 4.1.7

    How would I get the new version to get started even after restart?
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    About that homedir, are you logging in as admin? root has /home/shares, AFAIK. And are you using firmware or Entware ssh server? The first one uses /etc/passwd to find the homedir, and the other /opt/etc/passwd, which might be another file, but could also be a symlink to /etc/passwd.

    About smbd, I wrote an Entware-ng package to install Entware Samba on a firmware 4 device. I think it should also work on a firmware 5 device like yours. You can find it here:
    Basically it's only a start script in /opt/etc/init.d/ which patches /etc/init.d/samba.sh to start Entware smbd instead of the firmware one.
  • Diskutant
    Diskutant Posts: 7  Freshman Member
    yes I'm logging in as admin.
    seems like I use the firmware ssh server now, changing that file doesn't survive the reboot though.
    Well, might just install the entware ssh server later.

    the link isn't working, it just reloads this thread. But I found the package at http://zyxel.diskstation.eu/Users/Mijzelf/Entware-ng/binaries/armv5/zyxel-samba-replacement_3.6.25_all.ipk
    But I can't install it using opkg because it needs samba36-server

    I tried to manually install it (move the S09ZyXELSambaReplacement file into /opt/etc/init.d/ and the conf file in /opt/etc/samba

    but after that smbd didn't start at all on reboot.
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    changing that file doesn't survive the reboot though.

    If you mean /etc/passwd, that's true. It's on a ramdisk. Does it show /home/shares/ as homedir for admin?

    the link isn't working

    This forum software is completely borked. I just copied the link, and pasted it. Just like you, I suppose.

    but after that smbd didn't start at all on reboot.

    Can you paste the output of

    sh -x /opt/etc/init.d/S09ZyXELSambaReplacement start

    and

    sh -x /etc/init.d/samba.sh start

    (In that sequence. The first script is supposed to change the second.)





  • Diskutant
    Diskutant Posts: 7  Freshman Member
    edited November 2020
    Yes /etc/passwd shows /home/shares as homedir for admin.
    I guess entware-ng changed that to /i-data/fd19ae31/admin but as I deactivated that it's back to default. I guess I will have to install an entware ssh later.

    should the original smbd be running when running those commands?
    I did both, first with original smbd running
    The output of the first command: https://pastebin.com/Ws9LHDCH
    I got asked if I want to remove some files, I said no each time.

    Second command: https://pastebin.com/f67T018P

    and without it running (with S09ZyXELSambaReplacement in init.d dir and rebooting)

    First command: https://pastebin.com/0aLXbVNx

    Second command: https://pastebin.com/5gFh26Ld

  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    I read a lot of permission denied's. Can you repeat when logged in as root?
  • Diskutant
    Diskutant Posts: 7  Freshman Member
    output of both commands: https://pastebin.com/LtGRZV4W
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    That looks good. It seems to me both smbd and nmbd are started, but maybe they error out? You can make it more verbose:

    /opt/sbin/smbd -d 1 -l /opt/var/samba.log -s /opt/etc/samba/ZyXELSambaReplacement.conf





  • Diskutant
    Diskutant Posts: 7  Freshman Member
    entered the command as root, output here: https://pastebin.com/634CrMzC
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    '-l /opt/var/samba.log' does something different than I thought. I thought it specified a logfile, but actually it specifies a directory.
    So you can create it

    mkdir /opt/var/samba.log

    and repeat

    /opt/sbin/smbd -d 1 -l /opt/var/samba.log -s /opt/etc/samba/ZyXELSambaReplacement.conf

    Look also in the new logdir for clues.

    Your output shows some warnings about the config, it is possible that even if samba keeps running it will be unusable, because the (dynamically created) firmware config file is not compatible with samba4.

Consumer Product Help Center