Samba on FreeBSD: nmbd 'namequery' errors in terminal from other IPs on LAN

Discussion in 'FreeBSD and FreeNAS' started by AveryFreeman, Aug 31, 2018.

  1. AveryFreeman

    AveryFreeman ESXi + ( BSD / ZFS ) = HAPPY

    Joined:
    Mar 17, 2017
    Messages:
    104
    Likes Received:
    9
    Hey,

    so this has been an ongoing problem for me for at least a year now. It doesn't seem to have any negative effect other than being highly annoying.

    I haven't noticed it on Linux VMs, but on my FreeBSD VMs (I've run at least 3 over the past year), my Samba configuration appears to be geeking out over an unknown issue and echoing the error to the terminal. Makes it hard to type sometimes when not accessing the VM via SSH.

    Here's an example from today - the same info is logged in /var/log/samba4/nmbd.log, also:

    Code:
    This response was from IP 192.168.1.31, reporting an IP address of 192.168.1.31.
    [2018/08/31 07:10:27.061128,  3] ../source3/nmbd/nmbd_incomingrequests.c:459(process_name_query_request)
    
    And here's my /usr/local/etc/smb4.conf (I'm using WS2012R2 DCs):

    Code:
    [global]
            netbios name = FREEBSDSRV
            security = ADS
            workgroup = DOMAIN
            realm = DOMAIN.COM
            client use spnego = yes
            client signing = yes
            server signing = yes
            client ntlmv2 auth = yes
            encrypt passwords = yes
    
            log file = /var/log/samba4/%m.log
            log level = 3
    
            idmap config * : backend = tdb
            idmap config * : range = 3000-7999
            idmap config DOMAIN : backend = ad
            idmap config DOMAIN : schema_mode = rfc2307
            idmap config DOMAIN : range = 10000-999999
            idmap config DOMAIN : unix_nss_info = yes
            idmap config DOMAIN : unix_primary_group = yes
    
            ;winbind use default domain = yes
            winbind enum users = yes
            winbind enum groups = yes
            winbind offline logon = yes
            ;winbind nested groups = yes
            winbind refresh tickets = yes
            winbind nss info = rfc2307
    
            ;winbind nss info = template
            ;template shell = /bin/bash
            ;template homedir = /home/%D/%U
    
    And lastly, the version of Samba I'm currently using:

    Code:
    # smbd --version
    Version 4.7.7
    
    Does anyone know if this is an error, and why is it being echoed to my terminal? Is there any good way to make it stop?
     
    #1
  2. EffrafaxOfWug

    EffrafaxOfWug Radioactive Member

    Joined:
    Feb 12, 2015
    Messages:
    682
    Likes Received:
    239
    This is just NMBD responding to NetBIOS queries. You've got a log level set to 3 which on your system might mean that these messages get echoed to console (depends entirely what logging rules you might have set up). Simplest way would be to change the logging config to stop these getting spammed to the console.

    If you can get away with it, personally I'd disable netbios in smb.conf ('disable netbios = yes' in the global section) and rely on DNS instead - that should stop NMDB responding to these things at all. Similarly you could firewall off the netbios ports and hope nothing breaks.
     
    #2
  3. AveryFreeman

    AveryFreeman ESXi + ( BSD / ZFS ) = HAPPY

    Joined:
    Mar 17, 2017
    Messages:
    104
    Likes Received:
    9
    Rad! Thank you, no matter how much google-fu I drop-kicked on my keyboard, I couldn't figure this out...

    I will try disabling NetBIOS and also lower my log level (it's probably just a relic I had forgotten about from when I was first figuring out how to write samba configuration files)...

    I hope nothing breaks, too ;)

    Edit: I disabled netbios and lowered the log level to 5 on my main file server could still access its shares from Windows. Yay! Off to a good start...

    Samba wiki doesn't describe different log levels very well, but I am guessing they're in descending levels from 1 - 10 (1 being most granular) and also had interesting stuff to say about logging auth / passdb info...

    Setting the Samba Log Level - SambaWiki
     
    #3
    Last edited: Aug 31, 2018
  4. EffrafaxOfWug

    EffrafaxOfWug Radioactive Member

    Joined:
    Feb 12, 2015
    Messages:
    682
    Likes Received:
    239
    It's t'other way around - 1 is a little logging, 2 is a fair amount of logging, 3 is a metric shit-ton of logging and anything higher is an imperial arse-wad of logging. Setting it to 10 is actually all the way up to eleven.
     
    #4
  5. AveryFreeman

    AveryFreeman ESXi + ( BSD / ZFS ) = HAPPY

    Joined:
    Mar 17, 2017
    Messages:
    104
    Likes Received:
    9
    oh shit! I wonder what I was reading that was the other way around, I think it was something related like realmd from when I was messing around with CentOS 7.

    I'd better change this RIGHT AWAY! I don't need any (more) imperial arse-wads.
     
    #5
Similar Threads: Samba FreeBSD
Forum Title Date
FreeBSD and FreeNAS FreeBSD and Samba 4.6.4+, SMB3 Jun 18, 2017
FreeBSD and FreeNAS FreeNAS samba share prompting for a password Jul 24, 2018
FreeBSD and FreeNAS pfSense2.4.3(FreeBSD11.1) support the intel 82599EB 10-Gigabit ? Sep 21, 2018
FreeBSD and FreeNAS FreeBSD/pfSense guest 10GbE SR-IOV VF successes? Aug 30, 2018
FreeBSD and FreeNAS Use FreeNAS and FreeBSD service to talk to wireless sensors Jun 15, 2018

Share This Page