Steve Ankeny
2015-Nov-05 16:21 UTC
[Samba] Problem with DNS configuration and "host" command . . .
I'm following the instructions here -- https://wiki.samba.org/index.php/Setup_a_Samba_Active_Directory_Domain_Controller I've successfully "tested" my domain controller -- adam at eagle:~$ smbclient -L localhost -U% Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] Sharename Type Comment --------- ---- ------- netlogon Disk sysvol Disk IPC$ IPC IPC Service (Samba 4.1.18-Debian) Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] Server Comment --------- ------- Workgroup Master --------- ------- SMBDOMAIN.COM HP-FRONTDESK WORKGROUP EAGLE adam at eagle:~$ adam at eagle:~$ smbclient //localhost/netlogon -UAdministrator -c 'ls' Enter Administrator's password: Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] . D 0 Wed Nov 4 11:51:37 2015 .. D 0 Wed Nov 4 11:51:43 2015 49698 blocks of size 2097152. 46051 blocks available adam at eagle:~$ *It's when I get to the "host" command that it fails* -- adam at eagle:~$ host -t SRV _ldap._tcp.eagle.smbdomain.com. Host _ldap._tcp.eagle.smbdomain.com. not found: 3(NXDOMAIN) adam at eagle:~$ Ubuntu "suggests" configuring a static ip in '/etc/network/interfaces' (instead of 'resolv.conf') -- adam at eagle:~$ cat /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.121.149 netmask 255.255.255.0 gateway 192.168.121.1 dns-search smbdomain.com dns-nameservers 192.168.121.149 adam at eagle:~$ Here's my 'smb.conf' (as provisioned, no edits) -- adam at eagle:~$ cat /etc/samba/smb.conf # Global parameters [global] workgroup = SMBDOMAIN realm = SMBDOMAIN.COM netbios name = EAGLE server role = active directory domain controller dns forwarder = 192.168.121.1 idmap_ldb:use rfc2307 = yes [netlogon] path = /var/lib/samba/sysvol/smbdomain.com/scripts read only = No [sysvol] path = /var/lib/samba/sysvol read only = No adam at eagle:~$ Any suggestions? Thanks.
Rowland Penny
2015-Nov-05 16:38 UTC
[Samba] Problem with DNS configuration and "host" command . . .
On 05/11/15 16:21, Steve Ankeny wrote:> I'm following the instructions here -- > > https://wiki.samba.org/index.php/Setup_a_Samba_Active_Directory_Domain_Controller > > > I've successfully "tested" my domain controller -- > > adam at eagle:~$ smbclient -L localhost -U% > Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] > > Sharename Type Comment > --------- ---- ------- > netlogon Disk > sysvol Disk > IPC$ IPC IPC Service (Samba 4.1.18-Debian) > Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] > > Server Comment > --------- ------- > > Workgroup Master > --------- ------- > SMBDOMAIN.COM HP-FRONTDESK > WORKGROUP EAGLE > adam at eagle:~$ > > adam at eagle:~$ smbclient //localhost/netlogon -UAdministrator -c 'ls' > Enter Administrator's password: > Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] > . D 0 Wed Nov 4 11:51:37 > 2015 > .. D 0 Wed Nov 4 11:51:43 > 2015 > > 49698 blocks of size 2097152. 46051 blocks available > adam at eagle:~$ > > *It's when I get to the "host" command that it fails* -- > > adam at eagle:~$ host -t SRV _ldap._tcp.eagle.smbdomain.com. > Host _ldap._tcp.eagle.smbdomain.com. not found: 3(NXDOMAIN) > adam at eagle:~$ > > Ubuntu "suggests" configuring a static ip in '/etc/network/interfaces' > (instead of 'resolv.conf') --Don't believe Ubuntu :-D Is this on the DC ? if so, can I suggest 'apt-get purge network-manager' This will remove Network Manager (you don't need it on a machine with a fixed IP) If resolvconf is installed, I would also remove this. Set /etc/resolv.conf to point to itself: search smbdomain.com nameserver 127.0.0.1 # or you could use the DCs IP> > adam at eagle:~$ cat /etc/network/interfaces > > # The loopback network interface > auto lo > iface lo inet loopback > > # The primary network interface > auto eth0 > iface eth0 inet static > address 192.168.121.149 > netmask 255.255.255.0 > gateway 192.168.121.1 > dns-search smbdomain.com > dns-nameservers 192.168.121.149Remove the 'dns' lines they do not really belong in this file. See if this fixes your problem, if not report back. Rowland> adam at eagle:~$ > > Here's my 'smb.conf' (as provisioned, no edits) -- > > adam at eagle:~$ cat /etc/samba/smb.conf > # Global parameters > [global] > workgroup = SMBDOMAIN > realm = SMBDOMAIN.COM > netbios name = EAGLE > server role = active directory domain controller > dns forwarder = 192.168.121.1 > idmap_ldb:use rfc2307 = yes > > [netlogon] > path = /var/lib/samba/sysvol/smbdomain.com/scripts > read only = No > > [sysvol] > path = /var/lib/samba/sysvol > read only = No > adam at eagle:~$ > > Any suggestions? Thanks. > >
Steve Ankeny
2015-Nov-05 16:42 UTC
[Samba] Problem with DNS configuration and "host" command . . .
On 11/05/2015 11:21 AM, Steve Ankeny wrote:> I'm following the instructions here -- > > https://wiki.samba.org/index.php/Setup_a_Samba_Active_Directory_Domain_Controller > > > I've successfully "tested" my domain controller -- > > adam at eagle:~$ smbclient -L localhost -U% > Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] > > Sharename Type Comment > --------- ---- ------- > netlogon Disk > sysvol Disk > IPC$ IPC IPC Service (Samba 4.1.18-Debian) > Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] > > Server Comment > --------- ------- > > Workgroup Master > --------- ------- > SMBDOMAIN.COM HP-FRONTDESK > WORKGROUP EAGLE > adam at eagle:~$ > > adam at eagle:~$ smbclient //localhost/netlogon -UAdministrator -c 'ls' > Enter Administrator's password: > Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] > . D 0 Wed Nov 4 11:51:37 > 2015 > .. D 0 Wed Nov 4 11:51:43 > 2015 > > 49698 blocks of size 2097152. 46051 blocks available > adam at eagle:~$ > > *It's when I get to the "host" command that it fails* -- > > adam at eagle:~$ host -t SRV _ldap._tcp.eagle.smbdomain.com. > Host _ldap._tcp.eagle.smbdomain.com. not found: 3(NXDOMAIN) > adam at eagle:~$ > > Ubuntu "suggests" configuring a static ip in '/etc/network/interfaces' > (instead of 'resolv.conf') -- > > adam at eagle:~$ cat /etc/network/interfaces > > # The loopback network interface > auto lo > iface lo inet loopback > > # The primary network interface > auto eth0 > iface eth0 inet static > address 192.168.121.149 > netmask 255.255.255.0 > gateway 192.168.121.1 > dns-search smbdomain.com > dns-nameservers 192.168.121.149 > adam at eagle:~$ > > Here's my 'smb.conf' (as provisioned, no edits) -- > > adam at eagle:~$ cat /etc/samba/smb.conf > # Global parameters > [global] > workgroup = SMBDOMAIN > realm = SMBDOMAIN.COM > netbios name = EAGLE > server role = active directory domain controller > dns forwarder = 192.168.121.1 > idmap_ldb:use rfc2307 = yes > > [netlogon] > path = /var/lib/samba/sysvol/smbdomain.com/scripts > read only = No > > [sysvol] > path = /var/lib/samba/sysvol > read only = No > adam at eagle:~$ > > Any suggestions? Thanks. > >FIXED IT! I misunderstood the command -- adam at eagle:~$ host -t SRV _ldap._tcp.smbdomain.com. _ldap._tcp.smbdomain.com has SRV record 0 100 389 eagle.smbdomain.com. adam at eagle:~$ I arrived at the conclusion by following the instructions here -- https://wiki.samba.org/index.php/Testing_DNS_Name_Resolution thx
Steve Ankeny
2015-Nov-05 17:08 UTC
[Samba] Problem with DNS configuration and "host" command . . .
On 11/05/2015 11:38 AM, Rowland Penny wrote:> On 05/11/15 16:21, Steve Ankeny wrote: >> I'm following the instructions here -- >> >> https://wiki.samba.org/index.php/Setup_a_Samba_Active_Directory_Domain_Controller >> >> >> I've successfully "tested" my domain controller -- >> >> adam at eagle:~$ smbclient -L localhost -U% >> Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] >> >> Sharename Type Comment >> --------- ---- ------- >> netlogon Disk >> sysvol Disk >> IPC$ IPC IPC Service (Samba 4.1.18-Debian) >> Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] >> >> Server Comment >> --------- ------- >> >> Workgroup Master >> --------- ------- >> SMBDOMAIN.COM HP-FRONTDESK >> WORKGROUP EAGLE >> adam at eagle:~$ >> >> adam at eagle:~$ smbclient //localhost/netlogon -UAdministrator -c 'ls' >> Enter Administrator's password: >> Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] >> . D 0 Wed Nov 4 11:51:37 >> 2015 >> .. D 0 Wed Nov 4 11:51:43 >> 2015 >> >> 49698 blocks of size 2097152. 46051 blocks available >> adam at eagle:~$ >> >> *It's when I get to the "host" command that it fails* -- >> >> adam at eagle:~$ host -t SRV _ldap._tcp.eagle.smbdomain.com. >> Host _ldap._tcp.eagle.smbdomain.com. not found: 3(NXDOMAIN) >> adam at eagle:~$ >> >> Ubuntu "suggests" configuring a static ip in >> '/etc/network/interfaces' (instead of 'resolv.conf') -- > > Don't believe Ubuntu :-D > > Is this on the DC ? if so, can I suggest 'apt-get purge network-manager' > > This will remove Network Manager (you don't need it on a machine with > a fixed IP) > If resolvconf is installed, I would also remove this. > > Set /etc/resolv.conf to point to itself: > > search smbdomain.com > nameserver 127.0.0.1 # or you could use the DCs IP >'network-manager' is not installed but 'resolvconf' is -- adam at eagle:~$ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 192.168.121.149 search smbdomain.com adam at eagle:~$ I DID NOT EDIT 'resolv.conf'>> >> adam at eagle:~$ cat /etc/network/interfaces >> >> # The loopback network interface >> auto lo >> iface lo inet loopback >> >> # The primary network interface >> auto eth0 >> iface eth0 inet static >> address 192.168.121.149 >> netmask 255.255.255.0 >> gateway 192.168.121.1 >> dns-search smbdomain.com >> dns-nameservers 192.168.121.149 > > Remove the 'dns' lines they do not really belong in this file. > > See if this fixes your problem, if not report back. > > Rowland >You'll see that I fixed the problem, and you'll see that in Ubuntu "dns-search" etc. worked. Thanks for the suggestions. You know how it is. You work on a problem for awhile, and then you put it into words, and all of a sudden, the answer comes to you from some other source (as here)> >> adam at eagle:~$ >> >> Here's my 'smb.conf' (as provisioned, no edits) -- >> >> adam at eagle:~$ cat /etc/samba/smb.conf >> # Global parameters >> [global] >> workgroup = SMBDOMAIN >> realm = SMBDOMAIN.COM >> netbios name = EAGLE >> server role = active directory domain controller >> dns forwarder = 192.168.121.1 >> idmap_ldb:use rfc2307 = yes >> >> [netlogon] >> path = /var/lib/samba/sysvol/smbdomain.com/scripts >> read only = No >> >> [sysvol] >> path = /var/lib/samba/sysvol >> read only = No >> adam at eagle:~$ >> >> Any suggestions? Thanks. >> >> > >