[Samba] HOW-TO on Samba4 Installation with dnsmasq

Tobias Schliebitz tobias.schliebitz at googlemail.com
Mon Jan 4 15:39:35 MST 2010

Dear all,

I'm currently trying out Samba4.0.0-alpha10. Because I'm unfamiliar with 
the Berkeley Internet Name Demon (bind), I've so far been using dnsmasq 
on my home network. I just want to inform eveybody who cares that it's 
possible to set up Samba4 and dnsmasq so as to allow domain logons from 
a Windows 7 workstation.

Generally, I followed the how-to on the samba-wiki 
(http://wiki.samba.org/index.php/Samba4/HOWTO). But I skipped Step 8 
(Configure Server-side DNS) and put most of the entries in what is 
called YOUR.ZONE.conf into my /etc/hosts, which is in turn read by 
dnsmasq and propagated to the network clients. Here is what it looks like:

---               localhost                                       
localhost           yoda.heimatnetz.priv                            yoda
[... description of my network clients ...]           gc._msdcs.heimatnetz.priv                       
gc._msdcs           _gc._tcp.heimatnetz.priv                        
_ldap._tcp.Default-First-Site-Name._sites.gc._msdcs           _gc._tcp.gc._msdcs.heimatnetz.priv              
_gc._tcp.gc._msdcs           _ldap._tcp.gc._msdcs.heimatnetz.priv            
_ldap._tcp.gc._msdcs           _ldap._tcp.heimatnetz.priv                      
_ldap._tcp           _ldap._tcp.dc._msdcs.heimatnetz.priv            


Of course, you must be very careful with any MS-specific entry containig 
an underscore ( _ ).
Then the /etc/dnsmasq.conf file:





dhcp-option=1,             # Subnet Mask
dhcp-option=3,             # Router/Gateway
dhcp-option=6,             # Domain Server (DNS)
dhcp-option=44,            # Netbios Name Server (WINS)
dhcp-option=4,             # Time Server


Naturally, the lines concerning DNS and WINS are especially important.
No special entries in the smb.conf file besides those created by 
provisioning are necessary, but the entries there ought to match your 
network configuration. Mine are:


        netbios name    = YODA
        server string   = Samba 4 auf yoda.heimatnetz.priv

        workgroup       = HEIMATNETZ
        realm           = HEIMATNETZ.PRIV
        server role     = domain controller

        unix charset    = ISO8859-1
        dos charset     = UTF8
        log level       = 0

        time server     = yes

        path = /usr/local/samba/var/locks/sysvol/heimatnetz.priv/scripts
        read only = no

        path = /usr/local/samba/var/locks/sysvol
        read only = no


I hope this helps someone save some time, as it cost me many hours to 
find this way.


More information about the samba mailing list