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. >> >> > >
Reindl Harald
2015-Nov-05 17:14 UTC
[Samba] Problem with DNS configuration and "host" command . . .
Am 05.11.2015 um 18:08 schrieb Steve Ankeny:> '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'but if dhcp is part of the game it is updated automatically until you set peernds=no https://www.google.com/search?q=peernds -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20151105/be031206/signature.sig>
Steve Ankeny
2015-Nov-05 18:40 UTC
[Samba] Problem with DNS configuration and "host" command . . .
On 11/05/2015 12:14 PM, Reindl Harald wrote:> > > Am 05.11.2015 um 18:08 schrieb Steve Ankeny: >> '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' > > but if dhcp is part of the game it is updated automatically until you > set peernds=no > > https://www.google.com/search?q=peernds > > >Ubuntu says to set a static ip in 'interfaces' (and, I thought that stopped DHCP) https://help.ubuntu.com/14.04/serverguide/network-configuration.html#ip-addressing https://help.ubuntu.com/14.04/serverguide/network-configuration.html#name-resolution I'm not getting any errors. I'm not sure I need to make a change? The only instances of "peerdns" seem to be related to 'pppd' (which we're not using) adam at eagle:/$ sudo grep "peerdns" -r /etc /etc/ppp/peers/provider:usepeerdns /etc/ppp/ip-up.d/0000usepeerdns:# this variable is only set if the usepeerdns pppd option is being used /etc/ppp/ip-up.d/0dns-up:# conjunction with pppd's usepeerdns option it also handles dynamic dns. /etc/ppp/ip-up.d/0dns-up:# DNS1 and DNS2 are variables exported by pppd when using 'usepeerdns'. /etc/init.d/pppd-dns:[ -x /etc/ppp/ip-down.d/0000usepeerdns ] \ /etc/init.d/pppd-dns: && exec /etc/ppp/ip-down.d/0000usepeerdns adam at eagle:/$