0

I am trying to debug a SMB share issue on an embedded Linux setup. Before diving into source code, I want to make sure this is not a configuration problem. So here is my case:

Scenario-1: dhcp server enabled by default
1- system boots
2- udhcpcd server starts
3- smb server starts (smbd)
4- nmb server starts (nmbd)
5- smb share accessible

Scenario-2: dhcp server disabled by default
1- system boots
2- smbd starts
3- nmbd fails to start
4- smb share inaccessible
5- $/etc/init.d/udhcpcd start
6- $/usr/sbin/nmbd still fails without an error message

The client pc and the server device have static IP addresses in both cases. Is it possible that, NMBD somehow depends on a DHCP server at start?

Atilla Filiz
  • 235
  • 4
  • 11

2 Answers2

3

I'm not aware of any dependency between Samba (nmbd or smbd) and a DHCP server -- I've installed Samba on many systems without a DHCP server on them.

If you can clarify the reason nmbd isn't starting (log entries are a good start, or run it in the foreground with debugging cranked up and note any errors) someone might be able to point you at a solution...

voretaq7
  • 79,345
  • 17
  • 128
  • 213
0

Not sure this helps you. I have had several Samba installs. I just today came to a point where I resolved a "nmbd doesn't start at boot time problem".

][i withdraw the claim I found the solution[]

It appears as 'after a reboot Samba doesn't work' so I had to manually start (or restart) it. I now remember that when I first created 'a Linux server at home' I wanted it to have a fixed IP. I also worked with etc/hosts files on Windows machines which was a pain to maintain. But Samba in that 'static' set-up worked. No Problem.

Then I changed hardware or was somehow forced to install everything all over again. I didn't mind the DHCP set-up question. Wanted to get rid of run and maintain the hosts files blues. So I settled with 'potentially changing IP addresses.

I wasn't aware there was a relation with the Samba problem. In that 2nd Samba install I did many things differently. Simpler... And because you don't often reboot a Linux server, it wasn't a problem to manually start it. In the beginning I was surprised it wasn't automatically loaded but I didn't bother to figure out.

So now with other Hardware again and a fresh set-up I experience the same strange behavior. Only half of Samba in the process list. Samba not working. I then found a post suggesting that nmbd doesn't start with address 0.0.0.0 which may be due to network not configured before nmbd starts. I in fact discovered that the DHCP server (ISP modem) may be very slow in response to DHCP requests. It's webserver is also terribly slow. The network actually starts (before the Samba start attempts nmbd and smbd) without an address and the boot sequence continues. Potentially seconds later the eth0 interface of my Linux box receives the address. Too late for nmbd. Somebody suggested to use a static lease in the DHCP client. Here is what I did in /etc/dhcp3/dhclient.conf

I uncommented the "lease section" near the bottom plus two commands in it. The rest is still commented out. It now is

lease { interface "eth0"; fixed-ip address 192.168.1.124; }

It works as it should. BTW, the address 192.168.1.124 was initially assigned to my box by DHCP.

This mixed DHCP set-up may work better then a true Fixed IP because DHCP seems to obtain many other details from the DHCP server then just the IP address.

robbiedee
  • 1
  • 1