NMB Problem

Samba seems to be broken on my server, and I can’t figure out what’s wrong. But at a minimum, this is:

# nmblookup -B 192.168.0.100 _SAMBA_
querying _SAMBA_ on 192.168.0.100
name_query failed to find name _SAMBA_
#

The only things I can find on line are that it means that nmbd isn’t running. But:

# ps -e | grep nmbd
8176 ? 00:00:00 nmbd
#

Does anyone have any ideas for how to troubleshoot this? Everything I find on line is distinctly unhelpful.

20 thoughts on “NMB Problem”

  1. God I hate Samba. I have very little to offer, except that just because your nmbd process is running doesn’t mean it’s actually doing what it’s supposed to do, so you certainly ought to try “/etc/init.d/samba restart” if you haven’t already.

  2. First, make sure that DNS returns the correct name both forwards (name to IP) and in reverse (IP to name). If it does, then restart the nmbd process and try again.

    If still no luck, check lmhosts.

  3. nmblookup -B takes a broadcast address for an argument.
    192.168.0.100 isn’t a broadcast address. Try 192.168.0.255

    Also try
    ” netstat -nap | grep 138″
    That will show you the addresses on which nmbd is listening.

  4. try “/etc/init.d/samba restart” if you haven’t already.

    Been there, done that, numerous times.

    Jeff — why would it be a DNS problem, when it can’t even find it by IP?

  5. Try 192.168.0.255

    # nmblookup -B 192.168.0.255 _SAMBA_
    querying _SAMBA_ on 192.168.0.255
    name_query failed to find name _SAMBA_
    #
    Also try ” netstat -nap | grep 138″

    # netstat -nap | grep 138
    tcp 0 0 192.168.0.100:44445 216.155.138.212:80 ESTABLISHED 2902/firefox
    tcp 0 0 192.168.0.100:56725 63.80.138.25:80 ESTABLISHED 2902/firefox
    udp 0 0 192.168.0.100:138 0.0.0.0:* 8176/nmbd
    udp 0 0 192.168.122.1:138 0.0.0.0:* 8176/nmbd
    udp 0 0 0.0.0.0:138 0.0.0.0:* 8176/nmbd

  6. I would try -U. You know where the server is, right? So, there’s no need to use -B.

    [zaitcev@lembas ~]$ nmblookup -U 192.168.128.1 elanor
    querying elanor on 192.168.128.1
    192.168.128.1 elanor
    [zaitcev@lembas ~]$ nmblookup -B 192.168.128.255 elanor
    querying elanor on 192.168.128.255
    name_query failed to find name elanor
    [zaitcev@lembas ~]$

    Yep, looks like broadcast does not work. Dunno why.

  7. Is _SAMBA_ the hostname of this box (192.168.0.100) ?
    Guessing not; try nmblookup -B 192.168.0.255 hostname.
    You should get an answer.

  8. He won’t get the answer, -B is busted apparently (on F12). I have the same thing, nmbd receives the request, even writes to nmbd.log that it did, and then… no answer and no error message.

    But still, is “_samba_” a real name or not? Why look it up? My network works just fine even if broadcast lookups do not, clients can see the network neighbourhood, mount shares, etc.

  9. I’m not looking for the hostname, I’m just following these instructions to troubleshoot Samba. That command is supposed to return the IP if things are working properly. It’s not.

    Except, D’OH!

    This particular page, now that I read it carefully, says to use double underscore, not single one, around SAMBA, and when I do, it works…

    # nmblookup -B linux-station __SAMBA__
    querying __SAMBA__ on 192.168.0.255
    192.168.0.100 __SAMBA__<00>
    #

    So that’s not my problem…

  10. Indeed, __samba__ works. And my problem with -B turned out to be the client’s firewall dropping NMB replies (since they are not from the address where the request was sent (e.g. broadcast)).

  11. smbclient -L … is the test that will tell you if everything is OK. Past that,
    you need to get into the ins and outs of /etc/samba/smb.conf. Good luck.

  12. The problem I’m having is that no other machine can see the server. In fact, even the server can’t see itself when I look inside Windows Networks from a file browser.

  13. Rand, for each share listed in smb.conf there is a flag “browseable”
    I’ll bet all the shares have “browseable=no”. Change the flag, do a
    /etc/init.d/samba restart and test again.

  14. Also look at the WINS support stuff at the top of smb.conf (about line
    40). Sounds like your solution is in there.

  15. Rand,
    Why not just pick up one of those quite little ethernet NAS appliances and just stop using SAMBA?

    I did it a few years ago and I haven’t looked back.

    Alan

  16. “Rand,
    Why not just pick up one of those quite little ethernet NAS appliances and just stop using SAMBA?

    I did it a few years ago and I haven’t looked back.

    Alan”

    Most of those little NAS appliances are running SAMBA !!

Comments are closed.