[Samba] Problem with DNS configuration and "host" command . . .
Steve Ankeny
steve_a at cinergymetro.net
Thu Nov 5 21:58:52 UTC 2015
On 11/05/2015 02:01 PM, Rowland Penny wrote:
> On 05/11/15 18:40, Steve Ankeny wrote:
>> 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:/$
>>
>>
>
> The thing with Ubuntu is that out of the box it generally uses dhcp,
> with Network Manager using dnsmasq as a dns cache, this does strange
> things to /etc/hosts. You may find that you have a line in /etc/hosts
> that starts '127.0.1.1' you may also find that '127.0.0.1' points to
> your fqdn, if either of these are there, I would advise removing them,
> '127.0.0.1' should just point to localhost, even on a DHCP machine. On
> a fixed ip machine, you should have a line similar to this:
>
> 192.168.0.6 client.domain.com client
> Where the hostname is 'client' in the domain 'domain.com' with the ip
> of 192.168.0.6
>
> If I am installing a DC on a machine, I usually remove Network Manager
> and resolvconf if they are installed and set the machine to a fixed ip
> and a fixed resolv.conf.
>
> Rowland
>
Gotcha!
I've already changed my 'hosts' file --
adam at eagle:~$ cat /etc/hosts
127.0.0.1 localhost.smbdomain.com localhost
192.168.121.149 eagle.smbdomain.com eagle
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
adam at eagle:~$
More information about the samba
mailing list