<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=Samba%2Fhow-to%2Fname_resolution</id>
	<title>Samba/how-to/name resolution - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=Samba%2Fhow-to%2Fname_resolution"/>
	<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=Samba/how-to/name_resolution&amp;action=history"/>
	<updated>2026-06-25T15:09:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://htyp.org/mw/index.php?title=Samba/how-to/name_resolution&amp;diff=24017&amp;oldid=prev</id>
		<title>Woozle: extracted from parent page</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=Samba/how-to/name_resolution&amp;diff=24017&amp;oldid=prev"/>
		<updated>2018-06-25T14:58:48Z</updated>

		<summary type="html">&lt;p&gt;extracted from parent page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Automatic resolution of Network Neighborhood names=&lt;br /&gt;
Some explanation, for technical purists:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Problem&amp;#039;&amp;#039;&amp;#039;: How can we add [[Network Neighborhood]] machine names to the search space used by [[Linux]]&amp;#039;s [[domain name resolver]]?&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Justification&amp;#039;&amp;#039;&amp;#039;: This is needed so that commands which accept a domain name as input (e.g. ftp, ssh, mysql) can accept a machine name instead, removing the necessity to manually look up the machine&amp;#039;s IP address. For example, I should be able to type &amp;#039;&amp;#039;&amp;#039;ssh &amp;lt;u&amp;gt;machinename&amp;lt;/u&amp;gt;&amp;#039;&amp;#039;&amp;#039; instead of having to first look up &amp;lt;u&amp;gt;machinename&amp;lt;/u&amp;gt;&amp;#039;s IP address via other methods, and then paste or retype that address (both methods prone to error) after the ssh command.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;&amp;#039;: Under some circumstances, Samba appears to set itself up this way automatically, but results have been inconsistent.&lt;br /&gt;
&lt;br /&gt;
I researched this extensively for many months and found many hideously complicated or otherwise inadequate solutions. It turns out, however, that there is quite a simple solution (which is probably trivially obvious to anyone with a solid understanding of how Linux networking is structured, and hence not worth mentioning):&lt;br /&gt;
* install [[winbind]]&lt;br /&gt;
** usually available in standard repositories; Ubuntu 6.06 and up have it&lt;br /&gt;
** this may not be necessary on some systems, e.g. Fedora 6 doesn&amp;#039;t show winbind in its [[package repository]], but the next step makes things work anyway&lt;br /&gt;
* edit /etc/[[nsswitch.conf]]&lt;br /&gt;
** change the &amp;quot;hosts&amp;quot; line to include &amp;quot;wins&amp;quot; before &amp;quot;dns&amp;quot; (see the [[nsswitch.conf|examples]])&lt;br /&gt;
&lt;br /&gt;
This tells Linux&amp;#039;s [[domain name resolver]] to check [[WINS]] before it checks [[DNS]] when resolving domain names. No further action should be required (you don&amp;#039;t even have to restart the networking daemon); test the change by trying to ping a local machine by name.&lt;br /&gt;
==related useful information==&lt;br /&gt;
The command &amp;#039;&amp;#039;&amp;#039;{{linuxcmd|nmblookup}} &amp;lt;u&amp;gt;machinename&amp;lt;/u&amp;gt;&amp;#039;&amp;#039;&amp;#039; returns an IP address, as will &amp;#039;&amp;#039;&amp;#039;{{linuxcmd|net}} lookup &amp;lt;u&amp;gt;machinename&amp;lt;/u&amp;gt;&amp;#039;&amp;#039;&amp;#039;. nmblookup apparently sends out a broadcast request (&amp;quot;anyone here named &amp;lt;u&amp;gt;machinename&amp;lt;/u&amp;gt;?&amp;quot;), while net lookup checks a central list (presumably on the Samba master browser).&lt;br /&gt;
&lt;br /&gt;
==explanations==&lt;br /&gt;
[[WINS]] is a method of [[domain name resolution]], as is [[DNS]]. [[WINS]] (a protocol) originally used [[NetBIOS]] (another, lower-level protocol), but more recently has switched to using [[TCP]].&lt;/div&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
</feed>