Quantcast

Hostname resolve fails after upgrade from 4.2 to 4.5

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Hostname resolve fails after upgrade from 4.2 to 4.5

Samba - samba-technical mailing list
Hi All,

Just have few queries related to resolving the hostnames with the newer
samba versions (4.5.x) Previoulsy i have used samba 4.2.x.

I have compiled and installed samba 4.2 in my debian machine.
At the end i have "smbd" and "nmbd" daemons running in my machine.

I could perform all cifs related functionalities (along with ping,
mount.cifs command) with both hostname and ip address.
For example,
ping debian-gp will work fine
mount.cifs //debian-gp/Music /mnt/SMB/mt_point1 works fine

But few days back i have upgraded samba to 4.5.x
I had both "smbd" and "nmbd" running in my machine
But one thing i noticed is i could perform all samba functionalties with ip
address and not with hostname.
ping ip address and mount command with ip address works fine
But if i use hostname instead of ip address in the above scenario, it says
"Unable to resolve"
I have not done anything other than upgrading samba from 4.2 to 4.5.
But after 4.5 upgrade "ping" and "mount.cifs" is failing with hostname.
ping debian-gp says "unknown host"
mount.cifs //debian-gp/Music /mnt/SMB/mt_point1 works fine says "Unable to
resolve"

Please let me know if i have missed anything here.

Thanks
Guruprasad
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hostname resolve fails after upgrade from 4.2 to 4.5

Samba - samba-technical mailing list
On 05/11/2017 04:40 PM, Guru Prasad via samba-technical wrote:

> Hi All,
>
> Just have few queries related to resolving the hostnames with the newer
> samba versions (4.5.x) Previoulsy i have used samba 4.2.x.
>
> I have compiled and installed samba 4.2 in my debian machine.
> At the end i have "smbd" and "nmbd" daemons running in my machine.
>
> I could perform all cifs related functionalities (along with ping,
> mount.cifs command) with both hostname and ip address.
> For example,
> ping debian-gp will work fine
> mount.cifs //debian-gp/Music /mnt/SMB/mt_point1 works fine
>
> But few days back i have upgraded samba to 4.5.x
> I had both "smbd" and "nmbd" running in my machine
> But one thing i noticed is i could perform all samba functionalties with ip
> address and not with hostname.
> ping ip address and mount command with ip address works fine
> But if i use hostname instead of ip address in the above scenario, it says
> "Unable to resolve"
> I have not done anything other than upgrading samba from 4.2 to 4.5.
> But after 4.5 upgrade "ping" and "mount.cifs" is failing with hostname.
> ping debian-gp says "unknown host"
> mount.cifs //debian-gp/Music /mnt/SMB/mt_point1 works fine says "Unable to
> resolve"
>
> Please let me know if i have missed anything here.
>
> Thanks
> Guruprasad
>

See https://www.samba.org/samba/history/samba-4.4.0.html.

Since Samba 4.4.0, the "wins" nsswitch module, which does the netbios
name resolution, has been rewritten to be a proxy to winbindd. This has
the benefit of making the module (which loads into any executable) more
lightweight, and also fixes and prevents some issues. However, it does
require winbindd to be running, in order to serve the requests.

I hope that helps,
Uri.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hostname resolve fails after upgrade from 4.2 to 4.5

Samba - samba-technical mailing list
Thank you very much Uri.
It means winbindd handles netbios name resolution from samba 4.4.0.
Just to understand, before samba 4.4.0 under which process this netbios
name resolution  was handled?

Thanks
Guru

On May 11, 2017 11:38 PM, "Uri Simchoni" <[hidden email]> wrote:

On 05/11/2017 04:40 PM, Guru Prasad via samba-technical wrote:

> Hi All,
>
> Just have few queries related to resolving the hostnames with the newer
> samba versions (4.5.x) Previoulsy i have used samba 4.2.x.
>
> I have compiled and installed samba 4.2 in my debian machine.
> At the end i have "smbd" and "nmbd" daemons running in my machine.
>
> I could perform all cifs related functionalities (along with ping,
> mount.cifs command) with both hostname and ip address.
> For example,
> ping debian-gp will work fine
> mount.cifs //debian-gp/Music /mnt/SMB/mt_point1 works fine
>
> But few days back i have upgraded samba to 4.5.x
> I had both "smbd" and "nmbd" running in my machine
> But one thing i noticed is i could perform all samba functionalties with
ip

> address and not with hostname.
> ping ip address and mount command with ip address works fine
> But if i use hostname instead of ip address in the above scenario, it says
> "Unable to resolve"
> I have not done anything other than upgrading samba from 4.2 to 4.5.
> But after 4.5 upgrade "ping" and "mount.cifs" is failing with hostname.
> ping debian-gp says "unknown host"
> mount.cifs //debian-gp/Music /mnt/SMB/mt_point1 works fine says "Unable to
> resolve"
>
> Please let me know if i have missed anything here.
>
> Thanks
> Guruprasad
>

See https://www.samba.org/samba/history/samba-4.4.0.html.

Since Samba 4.4.0, the "wins" nsswitch module, which does the netbios
name resolution, has been rewritten to be a proxy to winbindd. This has
the benefit of making the module (which loads into any executable) more
lightweight, and also fixes and prevents some issues. However, it does
require winbindd to be running, in order to serve the requests.

I hope that helps,
Uri.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hostname resolve fails after upgrade from 4.2 to 4.5

Samba - samba-technical mailing list
Thank you very much for the explanation Uri.

Thanks
Guru

On May 12, 2017 12:13 AM, "Uri Simchoni" <[hidden email]> wrote:

> On 05/11/2017 09:33 PM, Guru Prasad wrote:
> > Thank you very much Uri.
> > It means winbindd handles netbios name resolution from samba 4.4.0.
> > Just to understand, before samba 4.4.0 under which process this netbios
> > name resolution  was handled?
> >
> It was under the process that called getaddrinfo() or any other glibc
> name resolution routine.
>
> Glibc has a plugin mechanism (name service switch, or nsswitch for
> short) which loads plugins acording to /etc/nsswitch.conf. When a
> program (such as ping) calls getaddrinfo(), the glibc implementation
> loads those plugins and runs them according to the order and policy
> defined in /etc/nsswitch.conf.
>
> Prior to 4.4.0, the wins plugin itself would send and receive netbios
> packets, from the context that called getaddrinfo() or any other such
> function. Since 4.4.0, it sends a request to winbindd (over a Unix
> domain socket) and awaits response.
>
> Uri
> > Thanks
> > Guru
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hostname resolve fails after upgrade from 4.2 to 4.5

Samba - samba-technical mailing list
If the machine has samba 4.4 or above installed in it then any program such
as ping sends a request to winbindd for name resolution.

Hope ping is a independent program and doesn't depend on samba or winbindd.
Then how will the ping/mount request reaches winbindd from 4.4 and not
before that.

Is there any specific rule for this in nsswitch conf or somewhere else.

Please bear with me in case if my questions troubles you in your busy
schedule.


Thanks
Guru

On May 12, 2017 12:34 AM, "Guru Prasad" <[hidden email]> wrote:

> Thank you very much for the explanation Uri.
>
> Thanks
> Guru
>
> On May 12, 2017 12:13 AM, "Uri Simchoni" <[hidden email]> wrote:
>
>> On 05/11/2017 09:33 PM, Guru Prasad wrote:
>> > Thank you very much Uri.
>> > It means winbindd handles netbios name resolution from samba 4.4.0.
>> > Just to understand, before samba 4.4.0 under which process this netbios
>> > name resolution  was handled?
>> >
>> It was under the process that called getaddrinfo() or any other glibc
>> name resolution routine.
>>
>> Glibc has a plugin mechanism (name service switch, or nsswitch for
>> short) which loads plugins acording to /etc/nsswitch.conf. When a
>> program (such as ping) calls getaddrinfo(), the glibc implementation
>> loads those plugins and runs them according to the order and policy
>> defined in /etc/nsswitch.conf.
>>
>> Prior to 4.4.0, the wins plugin itself would send and receive netbios
>> packets, from the context that called getaddrinfo() or any other such
>> function. Since 4.4.0, it sends a request to winbindd (over a Unix
>> domain socket) and awaits response.
>>
>> Uri
>> > Thanks
>> > Guru
>> >
>>
>
Loading...