[Samba] Ubuntu client ddns failure [SOLVED]
L.P.H. van Belle
belle at bazuin.nl
Thu May 22 07:44:07 MDT 2014
and
The GNU C library does not employ the gethostname() system call;
instead, it implements gethostname() as a library function that calls
uname(2) and copies up to len bytes from the returned nodename field
into name.
so no search but library function that calls..
therefor make sure the base is set correct.
if not set correct search and a library function calls can give different results.
read :
http://manpages.ubuntu.com/manpages/precise/man2/gethostname.2.html
http://manpages.ubuntu.com/manpages/precise/man2/uname.2.html
see uname note on that page.
Louis
>-----Oorspronkelijk bericht-----
>Van: rowlandpenny at googlemail.com
>[mailto:samba-bounces at lists.samba.org] Namens Rowland Penny
>Verzonden: donderdag 22 mei 2014 15:38
>Aan: samba at lists.samba.org
>Onderwerp: Re: [Samba] Ubuntu client ddns failure [SOLVED]
>
>On 22/05/14 14:27, L.P.H. van Belle wrote:
>> Ok steve,
>>
>> not if you make sure it all is as it should be.
>>
>> ( from man resolv.conf (
>> domain = Local domain name.
>> Most queries for names within this domain can use
>short names relative to the local domain.
>> If no domain entry is present, the domain is
>determined from the local hostname returned by
>> =>> gethostname(2); the domain part is taken to be
>everything after the first '.'. < ===
>> => Finally, if the hostname does not contain a domain
>part, the root domain is assumed. <==
>>
>> exacly steves problem.
>>
>>
>> so always like this.
>>
>> domain ....
>> search .... ... ..
>> nameserver ....
>>
>> works always correct and the order is also important.
>Well yes, the order is important, it makes sure that 'domain'
>is ignored
>and 'search' is used instead ;-)
>
>Also from 'man resolv.conf'
>
>The domain and search keywords are mutually exclusive. If more than
>one instance of these keywords is present, the last instance wins.
>
>Rowland
>
>>
>> The address families hostname tries when looking up the FQDN, aliases
>> and network addresses of the host are determined by the configuration
>> of your resolver. For instance, on GNU Libc systems, the resolver
>> can be instructed to try IPv6 lookups first by using the
>inet6 option in
>> /etc/resolv.conf."
>>
>> so /etc/hosts, /etc/hostname and /etc/resolv.conf needs to
>be correct.
>> and hostname should have only the hostname ( not the domainname )
>>
>>
>> Louis
>>
>>
>>
>>
>>> -----Oorspronkelijk bericht-----
>>> Van: rowlandpenny at googlemail.com
>>> [mailto:samba-bounces at lists.samba.org] Namens Rowland Penny
>>> Verzonden: donderdag 22 mei 2014 15:07
>>> Aan: samba at lists.samba.org
>>> Onderwerp: Re: [Samba] Ubuntu client ddns failure [SOLVED]
>>>
>>> On 22/05/14 13:58, steve wrote:
>>>> On 22/05/14 14:45, L.P.H. van Belle wrote:
>>>>> no, FQDN in /etc/hostname.
>>>>>
>>>>> as you see here.
>>>>>
>>>>> cat /etc/hostname
>>>>> mail1
>>>>>
>>>>> hostname -s
>>>>> mail1
>>>>>
>>>>> hostname -d
>>>>> bazuin.nl
>>>>>
>>>>> hostname -f
>>>>> mail1.bazuin.nl
>>>>>
>>>>> getent hosts mail1.bazuin.nl
>>>>> 192.168.xxx.xxx mail1.bazuin.nl
>>>>> 195.xxx.xxx.xxx mail1.bazuin.nl
>>>>>
>>>>> getent hosts 192.168.xxx.xxx
>>>>> 192.168.xxx.xxx mail1.bazuin.nl
>>>>>
>>>>> all correct.
>>>>>
>>>>> Debian Reference specify that it is the unqualified hostname
>>>>> that should appear in this file /etc/hostname
>>>>>
>>>>> Steve did you put "domain hh3.site" in resolv.conf ?
>>>>> if not, do it.
>>>>> put the "single hostname " in /etc/hostname
>>>>> run
>>>>> hostname -F /etc/hostname
>>>>> reboot
>>>>>
>>>>> and recheck with above commands.
>>>>>
>>>>> Louis
>>>> Nope. No go. domain hh3.site in resolv.conf neither. The
>>> only way it
>>>> will go is if fqdn is in /etc/hostname
>>>>
>>>>
>>> putting 'domain hh3.site' wouldn't work if you already had 'search
>>> hh3.site' in there already, see this extract from 'man resolv.conf':
>>>
>>> The domain and search keywords are mutually exclusive. If more than
>>> one instance of these keywords is present, the last instance wins.
>>>
>>> Rowland
>>>
>>> --
>>> To unsubscribe from this list go to the following URL and read the
>>> instructions: https://lists.samba.org/mailman/options/samba
>>>
>>>
>
>--
>To unsubscribe from this list go to the following URL and read the
>instructions: https://lists.samba.org/mailman/options/samba
>
>
More information about the samba
mailing list