NSA325v2 - Entware-ng - SAMBA - no samba after hot NAS restart

135

All Replies

  • aldapooh
    aldapooh Posts: 66  Ally Member
    First Comment Friend Collector Second Anniversary Community MVP

    so what I did

    Step 1) Factory reset
    so I did factory system

    did basic configurations as I need them but nothing spectacular
    after that

    • Samba did not work on Win 11 - which is expected i think
    • Telnet works
    • SSH does not work
    • FTP works and I can see shares - so I assume biggest part of my problem has been resolved at this point in time
    • SCP does not work

    What is interesting - and I might be wrong here - if I recall correctly I had a volume on the disks called "Volume1" and all my other shares were under the "Volume1".

    Now after factory restart I see my shares and a share of "Volume1" but the share "Volume1" is empty. and other shares which were previously under "Volume1" are under root.

    Step 2) Enabling Entware-ng

    Next step was to enable Entware-ng. After enabling:

    • SAMBA asks for credentials but I cannot login on Win 11
    • Telnet works
    • SSH works
    • FTP stopped working - what a surprise - it was working fine before enabling Entware-ng - I again see empty root when logging via FTP as in my initial post here
    • SCP works now and I can see all folders

    Dear Mijzelf,

    two concerns or observations:
    A) I see many shares but they are no longer under Volume 1 as before

    B) after enabling entware-ng the login via FTP stops displaying any shares or folders, and I see empty root

    Thank you for bearing with me.
    Have a great relaxing week-end.

    -A

  • aldapooh
    aldapooh Posts: 66  Ally Member
    First Comment Friend Collector Second Anniversary Community MVP

    FYI - this is my Share screen

  • aldapooh
    aldapooh Posts: 66  Ally Member
    First Comment Friend Collector Second Anniversary Community MVP

    Then I started a file system check via the Web Admin interface and it now progresses - already at 33% when previously it hung on 21% always - so apparently a factory reset did something...

    actually it completed with a lot of errors being corrected like below:

    Scan Result


    e2fsck 1.41.14 (22-Dec-2010)
    Pass 1: Checking inodes, blocks, and sizes
    Inode 71041026 i_size is 17829657836 should be 17829986304. Fix? yes
    Inode 71041027 i_size is 4611989481 should be 4612685824. Fix? yes
    Inode 71041031 i_size is 150818 should be 1048576. Fix? yes
    Inode 71041032 i_size is 15840494389 should be 15840837632. Fix? yes
    Inode 71041033 i_size is 148446 should be 1048576. Fix? yes
    Inode 71041037 i_size is 5070752490 should be 5070913536. Fix? yes
    Inode 71041038 i_size is 4549159 should be 5242880. Fix? yes
    Inode 71041040 i_size is 8529101438 should be 8529117184. Fix? yes
    Inode 71041041 i_size is 5120815670 should be 5121245184. Fix? yes
    Inode 71041042 i_size is 2158358435 should be 2159017984. Fix? yes
    Inode 71041043 i_size is 5683379173 should be 5684330496. Fix? yes
    Inode 71041045 i_size is 653942 should be 1048576. Fix? yes
    Inode 71041046 i_size is 19918 should be 1048576. Fix? yes
    Inode 71041047 i_size is 5189934413 should be 5190451200. Fix? yes
    Inode 71041048 i_size is 9510909382 should be 9511632896. Fix? yes
    Inode 71041049 i_size is 1349166 should be 2097152. Fix? yes
    Inode 71041050 i_size is 1462725 should be 2097152. Fix? yes
    Inode 71041051 i_size is 4586068948 should be 4586471424. Fix? yes
    Inode 71041052 i_size is 7668091758 should be 7668236288. Fix? yes
    Inode 71041053 i_size is 607308 should be 1048576. Fix? yes
    Inode 71041054 i_size is 39243 should be 1048576. Fix? yes
    Inode 71041055 i_size is 5470225535 should be 5470420992. Fix? yes
    ...

    ...

    ...

    Inode 100682679 i_size is 655020 should be 1048576. Fix? yes
    Inode 100682680 i_size is 804743 should be 1048576. Fix? yes
    Inode 100682681 i_size is 1387636 should be 2097152. Fix? yes
    Inode 100682682 i_size is 4294 should be 1048576. Fix? yes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    Pass 4: Checking reference counts
    Pass 5: Checking group summary information
    /dev/md0: ***** FILE SYSTEM WAS MODIFIED *****
    /dev/md0: 387050/488349696 files (3.2% non-contiguous) 604267526/1953381376 blocks
    e2fsck -f -y return value:1
    OK

    024-06-21 22:34:37 storage info Scan Internal Volume (read-write operation): SUCCESS

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

    B) after enabling entware-ng the login via FTP stops displaying any shares or folders, and I see empty root

    Does the FTP start working after disabling entware-ng? If not, does it after a reboot (with disabled entware-ng)?

    There is something funny with the FTP login. A temporary directory with bindmounts to the shares available for that user is created, and that temporary directory becomes the home directory for the FTP client. When I remember well the creation is triggered by a pam hook on login. But I can't remember if and how the temporary directory is removed, after logout. And neither where that directory is located.

    On first sight my guess would be that entware-ng somehow prevents that temporary directory from being made. But that's not clear.

    If you have FTP working again, you can see the bindmounts by executing 'mount' or 'cat /proc/mounts'. Do that after reboot, and before logging in over FTP, and after logging in. The difference are the new mounts. It should tell where the temporary directory is located, and maybe then it's clear how entware-ng prevents that.

  • aldapooh
    aldapooh Posts: 66  Ally Member
    First Comment Friend Collector Second Anniversary Community MVP

    Hi Mijzelf,

    I disabled entware-ng, and immediately even without NAS restart, I login via FTP and can see the shares.

    this is the output without restart after disabling entware-ng

    ~ # cat /proc/mounts
    rootfs / rootfs rw 0 0
    /proc /proc proc rw,relatime 0 0
    /sys /sys sysfs rw,relatime 0 0
    none /proc/bus/usb usbfs rw,relatime 0 0
    devpts /dev/pts devpts rw,relatime,mode=600 0 0
    /dev/mtdblock8 /zyxel/mnt/nand yaffs2 ro,relatime 0 0
    /dev/sda1 /zyxel/mnt/sysdisk ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /ram_bin ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /usr ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/security ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/modules ext2 ro,relatime,errors=continue 0 0
    /dev/ram0 /tmp/tmpfs tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/etc tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/var tmpfs rw,relatime,size=5120k 0 0
    /dev/mtdblock4 /etc/zyxel yaffs2 rw,relatime 0 0
    /dev/md0 /i-data/52d93469 ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /etc/zyxel/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/pkg ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/web_framework/data/cache ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/mtdblock4 /usr/local/apache/web_framework/data/config yaffs2 rw,relatime 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/res/imdb_poster ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/public ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/video ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/photo ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/music ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/admin ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/Documents ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/mirror ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/nfs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/lost_and_found ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/Polkast\040Downloads ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/torrents ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/26430/Volume1 ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0

    after the NAS restart with disabled entware-ng I still can see directories via FTP

    ~ # cat /proc/mounts
    rootfs / rootfs rw 0 0
    /proc /proc proc rw,relatime 0 0
    /sys /sys sysfs rw,relatime 0 0
    none /proc/bus/usb usbfs rw,relatime 0 0
    devpts /dev/pts devpts rw,relatime,mode=600 0 0
    /dev/mtdblock8 /zyxel/mnt/nand yaffs2 ro,relatime 0 0
    /dev/sda1 /zyxel/mnt/sysdisk ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /ram_bin ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /usr ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/security ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/modules ext2 ro,relatime,errors=continue 0 0
    /dev/ram0 /tmp/tmpfs tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/etc tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/var tmpfs rw,relatime,size=5120k 0 0
    /dev/mtdblock4 /etc/zyxel yaffs2 rw,relatime 0 0
    /dev/md0 /i-data/52d93469 ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /etc/zyxel/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/pkg ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/web_framework/data/cache ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/mtdblock4 /usr/local/apache/web_framework/data/config yaffs2 rw,relatime 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/res/imdb_poster ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/public ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/video ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/photo ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/music ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/admin ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/Documents ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/mirror ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/nfs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/lost_and_found ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/Polkast\040Downloads ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/torrents ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/3902/Volume1 ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0

    but I have been logged in via FTP when both commands were executed.

  • aldapooh
    aldapooh Posts: 66  Ally Member
    First Comment Friend Collector Second Anniversary Community MVP

    now the output after restart without logging via FTP with disabled entware-ng

    ~ # cat /proc/mounts
    rootfs / rootfs rw 0 0
    /proc /proc proc rw,relatime 0 0
    /sys /sys sysfs rw,relatime 0 0
    none /proc/bus/usb usbfs rw,relatime 0 0
    devpts /dev/pts devpts rw,relatime,mode=600 0 0
    /dev/mtdblock8 /zyxel/mnt/nand yaffs2 ro,relatime 0 0
    /dev/sda1 /zyxel/mnt/sysdisk ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /ram_bin ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /usr ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/security ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/modules ext2 ro,relatime,errors=continue 0 0
    /dev/ram0 /tmp/tmpfs tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/etc tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/var tmpfs rw,relatime,size=5120k 0 0
    /dev/mtdblock4 /etc/zyxel yaffs2 rw,relatime 0 0
    /dev/md0 /i-data/52d93469 ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /etc/zyxel/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/pkg ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/web_framework/data/cache ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/mtdblock4 /usr/local/apache/web_framework/data/config yaffs2 rw,relatime 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/res/imdb_poster ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0

  • aldapooh
    aldapooh Posts: 66  Ally Member
    First Comment Friend Collector Second Anniversary Community MVP

    now after enabling entware-ng without logging via FTP

    cat /proc/mounts
    rootfs / rootfs rw 0 0
    /proc /proc proc rw,relatime 0 0
    /sys /sys sysfs rw,relatime 0 0
    none /proc/bus/usb usbfs rw,relatime 0 0
    devpts /dev/pts devpts rw,relatime,mode=600 0 0
    /dev/mtdblock8 /zyxel/mnt/nand yaffs2 ro,relatime 0 0
    /dev/sda1 /zyxel/mnt/sysdisk ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /ram_bin ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /usr ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/security ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/modules ext2 ro,relatime,errors=continue 0 0
    /dev/ram0 /tmp/tmpfs tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/etc tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/var tmpfs rw,relatime,size=5120k 0 0
    /dev/mtdblock4 /etc/zyxel yaffs2 rw,relatime 0 0
    /dev/md0 /i-data/52d93469 ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /etc/zyxel/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/pkg ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/web_framework/data/cache ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/mtdblock4 /usr/local/apache/web_framework/data/config yaffs2 rw,relatime 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/res/imdb_poster ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0

    now with enabled entware-ng after logging with FTP but seeing no directories:

    ~ # cat /proc/mounts
    rootfs / rootfs rw 0 0
    /proc /proc proc rw,relatime 0 0
    /sys /sys sysfs rw,relatime 0 0
    none /proc/bus/usb usbfs rw,relatime 0 0
    devpts /dev/pts devpts rw,relatime,mode=600 0 0
    /dev/mtdblock8 /zyxel/mnt/nand yaffs2 ro,relatime 0 0
    /dev/sda1 /zyxel/mnt/sysdisk ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /ram_bin ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /usr ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/security ext2 ro,relatime,errors=continue 0 0
    /dev/loop0 /lib/modules ext2 ro,relatime,errors=continue 0 0
    /dev/ram0 /tmp/tmpfs tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/etc tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/var tmpfs rw,relatime,size=5120k 0 0
    /dev/mtdblock4 /etc/zyxel yaffs2 rw,relatime 0 0
    /dev/md0 /i-data/52d93469 ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /etc/zyxel/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/pkg ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /usr/local/apache/web_framework/data/cache ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/mtdblock4 /usr/local/apache/web_framework/data/config yaffs2 rw,relatime 0 0
    /dev/md0 /usr/local/apache/htdocs/adv,/res/imdb_poster ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0

  • aldapooh
    aldapooh Posts: 66  Ally Member
    First Comment Friend Collector Second Anniversary Community MVP

    and just a reminder - everything worked fine with entware-ng and FTP and SAMBA until unfortunate HARD restart via front power button.

    I searched a bit for similar issues and those two seems a bit similar:

    Case A)
    the symptoms seem to be similar to my one - or at least everything was broken due to unfortunate power loss

    Case B)

    it seems one can enable support of SAMBA 1.0 on WIn 11, which was not possible before?steps for win 11 are here: https://winsides.com/enable-smb-1-0-cifs-file-sharing-support-windows-11/

    but this does not work for me yet

  • aldapooh
    aldapooh Posts: 66  Ally Member
    First Comment Friend Collector Second Anniversary Community MVP

    could it be some read write permission issue?

    first when I login via FTP with disabled entware-ng I cannot see any system folders, only the shares.

    secondly, when I enable entware-ng I can login with SCP and see system folders, as "/etc/samba"

    but when I try to see or edit smb.conf via WinSCP, I got permission error:
    Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
    Command failed with return code 127.

  • Mijzelf
    Mijzelf Posts: 2,764  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    edited June 23

    Hm. I cannot reproduce it. With the SambaReplacement package active, I can login over ftp and the bindmounts are created.

    OK, let's start at the beginning.
    /home/shares is on a ramdisk (in case you are interested, it's in the initrd). The ftpserver (pure-ftpd) is configured to use pam (Pluggable Authentication Module) for user/passwd checking. The configuration for

    pam (/etc/pam.d/pure-ftpd) is

    auth required /lib/security/pam_pidhome.so
    auth requisite /lib/security/pam_smbpass.so
    account required /lib/security/pam_pidhome.so
    because of smbpass actually uses uam, so we need this to remove uam entry 
    when logout
    account required /lib/security/pam_uam.so
    account requisite /lib/security/pam_smbpass.so
    because of smbpass actually uses uam, so we need this to remove uam entry
    when logout
    session required /lib/security/pam_uam.so
    session requisite /lib/security/pam_pidhome.so
    

    I don't know what this all means, but somehow it uses pam_smbpass, which makes sense, as the login credentials are the same as the samba ones. Further it uses pam_pidhome on login and on logout. So that could be the creator and destructor of the /home/shares/NNN/ directory.

    Looking inside that module (strings /lib/security/pam_pidhome.so) I find strings like

    /bin/mkdir -p -m 0755 %s
    error creating mount dir %s
    user %s not found
    /etc/samba/smb.conf
    /home/shares
    mkdir -p /home/shares
    chmod 0777 /home/shares
    Error on creating home dir '%s'
    %s/%d/%s
    error creating Share dir '%s'
    /bin/mount --bind "%s" "%s"

    So that looks as if pam_pidhome.so reads /etc/samba/smb.conf to create the bindmounts in /home/shares/<pid>/ (Here pid is the pid of the forked pure-ftpd process designated to this login)

    Now entware. What the entware-ng package does on startup is:
    create a symlink /opt to the rootdir of the actual entware-ng directory (On an NSA that is /usr/local/zy-pkgs/opt). Then execute '/opt/etc/init.d/rc.unslung start'. rc.unslung will excute all executables /opt/etc/init.d/S* with the 'start' argument. That's it. On your box I expect 2 executables /opt/etc/init.d/S*, S09ZyXELSambaReplacement and S99ProfileHook.

    S09ZyXELSambaReplacement does:
    run '/etc/init.d/samba.sh shutdown' to stop the firmware samba.
    exchange /etc/init.d/samba.sh with a symlink to /opt/etc/init.d/S09ZyXELSambaReplacement
    run '/etc/init.d/samba.sh startup' to start the entware samba.

    The entware samba is configured to use the configuration /opt/etc/samba/ZyXELSambaReplacement.conf, which mainly contains 'include /etc/samba/smb.conf'

    The reason for the /etc/init.d/samba.sh symlink and the include in /opt/etc/samba/ZyXELSambaReplacement.conf, is that if the firmware wants to change something in the samba configuration (probably driven by a webinterface action) it generates a new /etc/samba/smb.conf and calls '/etc/init.d/samba.sh restart'. So this way it will transparantly restart entware samba.

    S99ProfileHook does:
    inject the line '[ -t 1 -a -f /opt/etc/profile ] && . /opt/etc/profile # Entware Hook' in /etc/profile. This line checks if /etc/profile is called from a 'real shell', and if yes it sources /opt/etc/profile, to inject entware in the environment. So you can use entware commands, when logging in over ssh, but the firmware scripts can't, as they are not running in a 'real shell'.

    So how does this interfere with pam_pidhome.so? I don't know. And I can't reproduce it. On my system I can login over ftp and browse the shares, while ZyXELSambaReplacement is running:

    $ cat /proc/mounts | grep /home/ && cat /proc/pidof nmbd/cmdline | tr '\0' ' '
    /dev/md0 /home/shares/21972/public ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/21972/video ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/21972/photo ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /dev/md0 /home/shares/21972/music ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
    /opt/sbin/nmbd -D -s /opt/etc/samba/ZyXELSambaReplacement.conf
    

    but when I try to see or edit smb.conf via WinSCP, I got permission error:

    Only root may edit smb.conf. So if you want to edit it using WinSCP, you'll have to login as root.

Consumer Product Help Center