What's new

entware Samba-4.9.7 smbd started, nmbd failed

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

zd59

Regular Contributor
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.
 
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?
 
Enable debug logging in Samba (check the documentation on how to do it, I don't know) to determine what is going on.
 
Enable debug logging in Samba (check the documentation on how to do it, I don't know) to determine what is going on.

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:
admin@Asus:/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
admin@Asus:/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?
 
I've finally managed to set up Samba4 to work. The main problem was dbus, as Entware install dbus for a root user. Had to replace "root" with "admin" in config files.

The only strange issue left is window discovery of samba shares:
smb.conf consist
Code:
workgroup = doma
netbios name = Asus
server string = Asus
Router config: LAN - DHCP server: RT-AC86U's Domain Name = "doma"

My home network workgroup name is "doma"
From windows "net view" show machines shares, but not routers.
Code:
net view
Server Name            Remark
-------------------------------------------------------------------------------
\\HP8460P
\\NB-T440P
\\SLON
\\ZONEMINDER           Samba Server
The command completed successfully.

When specify routers name the share is shown
Code:
net view \\asus
Shared resources at \\asus

Asus

Share name  Type  Used as  Comment

-------------------------------------------------------------------------------
bck         Disk
The command completed successfully.

Looks like router is not in workgroup "doma" inspite of that is named in smb.conf.
Why?
 
It looks like you're not using nmbd therefore it won't show up in "net view".

EDIT: You've already asked this question here and received the answer. Please don't double post.
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top