[Samba] nmbd don't start but gives no error (termux)

Rowland Penny rpenny at samba.org
Wed Mar 26 15:48:04 UTC 2025


On Wed, 26 Mar 2025 14:28:31 +0100
f0rhum via samba <samba at lists.samba.org> wrote:

> Hi Samba Members
> This is my first post here.
> In my digital camera pictures workflow I used to have samba. I'll be 
> glad to explain why if anybody asks.
> Now the workflow is broken at the level of the samba link.
> The required setup is a single client and a single standalone server 
> (the issue is in the server, if ever can be fixed without completely 
> replacing the client hardware, which... I'd rather like not ;-) ).
> The client is a digital camera (panasonic TZ70) with smb support. 
> According to the documentation of the camera, a Windows PC with Win7
> to 8.1 (which translates to smb2_10 to smb3_02 IIUC) is supported for 
> featured proprietary camera/PC transfer applications... that are now
> no more available... and I never used, as a Linux user.
> The server was an old Android App (SambaFilesharing-dev-130413.apk) 
> whose development is frozen for years and is incompatible with recent 
> hardware OS. Now the server would be the naked samba server running
> over termux emulator in Android15... or any paid app.
> What happened: I upgraded the server hardware, so the OS: Android5 to 
> 12/13/14 then A15 at the moment => server broken.
> 
> I hope I can get help from the list:
> The (firmware up to date) client is poorly features, so I'm using my 
> linux laptop to setup/test a working server in the phone, with no
> other helper app in the phone, by taking into account the
> requirements I'll later have with the real camera (for tests purpose
> I disabled the firewall in the laptop).
> At the moment I reached to connect to the server using its LAN IP
> address:
> 
> smbclient //192.168.1.5/tz70 -p4445 -U=redacteduser%redactedpw -d2 
> --debug-stdout
> rlimit_max: increasing rlimit_max (1024) to minimum Windows limit
> (16384) added interface wlan0 ip=redacted-not-useful-IPv6
> added interface wlan0 ip=redacted-not-useful-IPv6
> added interface wlan0 ip=192.168.1.29 bcast=192.168.1.255 
> netmask=255.255.255.0
> Cannot do GSE to an IP address
> Try "help" to get a list of possible commands.
> smb: \>
> 
> All fine, but maybe the GSE line. This also works with port 1139 *
> This will be enough when I'm at home, but won't work outside home
> where I must use the phone hotspot to bind the server to.
> And I can't connect using the netbios name set in smb.conf:
> me at laptop:~$ sudo smbclient //REDACTED-NAME-SHORTER-THAN-15/tz70
> -p4445 -U=redacteduser%redactedpw -d2 --debug-stdout
> ...
> do_connect: Connection to REDACTED failed (Error NT_STATUS_NOT_FOUND)
> 
> whether I use port [1]139/[1]138/[1]139/[4]445
> 
> The problem is I have to connect with the name because the server ip 
> will always change (new borring feature of Android hotspot since some 
> release between A5 and A12)
> 
> *the serveur runs as non root, so it can't bind to low ports and then 
> the default config in smb.conf is smb ports = 1139 4445
> to which I added without benefit
> nbt port = 1137
> dgram port = 1138
> 
> and in the phone I added 8 iptables -t nat PREROUTING rules to
> redirect tcp/udp the -d 4 low ports --to-destination 4 high ports
> 
> 
> There I am stuck
> smbtree says nothing but smbc_opendir: no such file or directory
> nbtscan finds nothing
> and
> ps -ax|grep mbd on server side only shows 3 smbd instances but none
> nmbd even a nmbd.pid file is updated in server's /var/run/samba/ on
> each time I run the command
> nmbd -D -p1137 -d3
> and the log won't show error
> 
> Please any clue ? I posted logs 2+ months ago with no answer since
> these days in https://github.com/termux/termux-packages/issues/22933
> 
> Thank you
> 

First, you need to identify just what the maximum SMB protocol your
camera is capable of, from the sound of it, it is SMBv2, if this is the
case, then you do not need nmbd on your phone, it is only used for
NetBIOS and that requires SMBv1 (known as NT1 on Samba).

Secondly, do not worry about the 'GSE' line, that is about kerberos and
you are not using kerberos.

From your link it appears you are running Samba as a standalone server
and provide the version of Samba you are running in termux is >= 4.11.0
, then you will be using SMBv2.

Provided that:
A) Samba running on termux works as it does on Linux
B) It is using SMBv2
C) Your camera users SMBV2

Then the following smb.conf should work:

[global]
   netbios name = MYPHONE
   workgroup = WORKGROUP
   server string = Samba on Termux
   security = user
   server role = standalone
   bind interfaces only = yes
   interfaces = 127.0.0.0/8 wlan0
   delete readonly = yes
   inherit permissions = yes
   multicast dns register = no
   host msdfs = no
   dcerpc endpoint servers = rpcecho
   disable netbios = yes
   smb ports = 4445
   max connections = 6
   max smbd processes = 8
   deadtime = 15
   restrict anonymous = 2
   aio write size = 0
   min receivefile size = 16384
   nt acl support = no
   smb1 unix extensions = no
   ea support = no
   store dos attributes = no
   map archive = no
   max log size = 50
   enable core files = no
   load printers = no
   printing = bsd
   printcap name = /dev/null
   disable spoolss = yes
   show add printer wizard = no
   max print jobs = 0

#============================ Share Definitions ==============================
[tz70]
   comment = Internal storage
   path = /sdcard/DCIM/tz70
   vfs objects = aio_pthread
   aio_pthread:aio open = yes
   read only = no

It is based on the one from your link, with the default settings,
things that shouldn't be used on a standalone server and anything to do
with SMBv1, removed.

I suggest you start by trying to connect to your phone (with termux and
the smbd deamon running) from a Linux computer and try to connect with
'smbclient -NL <YOUR_PHONES_IP_ADDRESS>'

If this works, you should get back a list of the shares available
(which in this case should be 'IPC$' and 'tz70'.

If it does work, Ensure that you have created a Samba user with
'smbpasswd -a <VALID_LOCAL_USERNAME>' and then try to connect to the
'tz70' share with:
smbclient //<YOUR_PHONES_IP_ADDRESS/tz70 -U <VALID_LOCAL_USERNAME> 

You should be prompted for the password for your user (the one you
created with smbpasswd) and then logged in.

If this all works, then disconnect and try to connect from the camera.

Good luck

Rowland



More information about the samba mailing list