1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

entware Samba-4.9.7 smbd started, nmbd failed

Discussion in 'Asuswrt-Merlin' started by zd59, Jun 12, 2019.

  1. zd59

    zd59 Occasional Visitor

    Joined:
    Feb 13, 2017
    Messages:
    18
    Hi!

    asuswrt-merlin 384.11_2 + Entware ARMv8 from may 2019

    Configured smb.conf, testparm returns no errors.

    Code:
    /opt/etc/init.d/S91smb start
    Starting SMB services:
    OK
    Starting NMB services:
    FAIL
    /opt/etc/samba/smb.conf:

    Code:
    [global]
        netbios name = Asus
    #    interfaces = lo br0
        server string = Samba on Asus
        workgroup = Doma
        guest account = nobody
        security = user
        map to guest = Bad User
        guest ok = yes
        guest only = no
        timestamp logs = no
        preserve case = yes
        short preserve case = yes
    #    socket options = TCP_NODELAY SO_KEEPALIVE IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
        log level = 5
    #    syslog = 0
        deadtime = 10
        passdb backend = smbpasswd
    #   smb encrypt = disabled
        smb passwd file = /opt/etc/samba/smbpasswd
    #    printcap name = /opt/etc/printcap
        printcap name = /dev/null
        load printers = no
        strict allocate = yes
        use sendfile = yes
    [bck]
        path = /tmp/mnt/bck
        guest ok = yes
        guest only =yes
        directory mode = 777
        create mode = 777
        public = yes
        writeable = yes
    
    bck - public folder access for everyone.

    There are no logs pointing to nmb. log.smbd do not show any info regarding failure.
     
  2. zd59

    zd59 Occasional Visitor

    Joined:
    Feb 13, 2017
    Messages:
    18
    Additional test:
    I configured Samba client from Merlin FW with GUI, where smb.conf is autogenerated. netbios name = Asus
    smbd & nmbd are running.
    Network share is visible from Windows PC:
    net view \\asus lists Samba share which is RW accessible.

    So I copied /etc/smb.conf to /opt ... and adapted folders there to /opt instead of /etc..
    Switch off Samba from firmware and start Samba from entware - /opt/etc/init.d/S91smb start

    The results surprised me:

    1.) smbd & nmbd BOTH are running, Samba share is accessible from Windows.
    2.) net view \\asus failed, but success when "asus" is replaced with router IP number.
    3.) nmbd did NOT survive router reboot. Again only smbd is runing. log level 4 do not reveal any warnings or errors

    Have anyone successfully started entware (may 2019, http://bin.entware.net/aarch64-k3.10) Samba ?
    samba4-admin - 4.9.7-1
    samba4-client - 4.9.7-1
    samba4-libs - 4.9.7-1
    samba4-server - 4.9.7-1
    samba4-utils - 4.9.7-1

    If yes, are there any specific smb.conf options?
     
  3. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    30,418
    Location:
    Canada
    Enable debug logging in Samba (check the documentation on how to do it, I don't know) to determine what is going on.
     
  4. zd59

    zd59 Occasional Visitor

    Joined:
    Feb 13, 2017
    Messages:
    18
    Wanted to write you regarding no data about nmbd in a log file (level 10), but was very suspicious.
    So I searched differently and found that THERE IS NO nmbd EXECUTABLE in a package samba4-server_4.9.7-1_aarch64-3.10.ipk on site http://bin.entware.net/aarch64-k3.10/ specified in opkg.conf.
    I fetched samba 3.6 package to compare:
    samba-3.6 consist /opt/sbin/samba_multicall and null size nmbd and smbd on the same place
    samba-4 package consist a single file in /opt/sbin/smbd and nothing else.
    Code:
    [email protected]:/tmp/home/root# opkg files samba4-server
    Package samba4-server (4.9.7-1) is installed on root and has the following files:
    /opt/sbin/smbd
    /opt/bin/smbpasswd
    /opt/lib/upgrade/keep.d/samba4-server
    /opt/etc/samba/smb.conf
    /opt/bin/pdbedit
    /opt/etc/init.d/S91smb
    /opt/bin/testparm
    /opt/etc/samba/smb.conf.template
    [email protected]:/tmp/home/root#
    which nmbd returns only /usr/sbin/nmbd - the one from firmware

    Looks a bug in entware package to me, as start service script /opt/etc/init.d/S91smb have line that calls nmbd.

    Reporting this to Entware guys?
     
  5. dave14305

    dave14305 Very Senior Member

    Joined:
    May 19, 2018
    Messages:
    777
    L&LD likes this.