Difference between revisions of "OpenWRT WINS with Samba"

Wiki.TerraBase.info
Jump to navigation Jump to search
m
m
Line 2: Line 2:
Invaluable Information from here: https://www.samba.org/samba/docs/using_samba/ch07.html (NOTE: This entire page is marked as "this is old information and might be incorrect", however, WINS is old too, and as it turns out, all of the information in regards to WINS is still accurate)
Invaluable Information from here: https://www.samba.org/samba/docs/using_samba/ch07.html (NOTE: This entire page is marked as "this is old information and might be incorrect", however, WINS is old too, and as it turns out, all of the information in regards to WINS is still accurate)


If there is no Windows Domain Controller within a subnet, the following configuration is recommended for the /etc/dhcpd;<syntaxhighlight lang="text">
===== Samba Related Information =====
# This configures Samba to enable WINS support
 
wins support = yes
====== Samba Information ======
# The following settings will make the WINS functionality of Samba the main "Browser" for a subnet
OpenWRT Samba is configured to look for the ''lmhosts'' file (all lower case) here: /etc/samba/lmhosts (it was verified by looking in the log files for where it loads the file)
# If using with a Windows Domain infrastructure, probably best to research a bit more before doing the following;
local master = yes
os level = 255
preferred master = yes
domain master = yes
</syntaxhighlight>


=====Commands Related to WINS for Samba=====
======Commands Related to WINS for Samba======
nmblookup is the command that can be used to check information within the Samba WINS database.
nmblookup is the command that can be used to check information within the Samba WINS database.


Line 23: Line 17:
<nowiki>*</nowiki> This webpage notes that there are various ways to display all of the records: https://superuser.com/questions/1492010/finding-all-samba-shares-in-local-network
<nowiki>*</nowiki> This webpage notes that there are various ways to display all of the records: https://superuser.com/questions/1492010/finding-all-samba-shares-in-local-network


=====Recommendation for Windows Hosts that are Multihomed (IE, have more than one network interface)=====
======Recommendation for Windows Hosts that are Multihomed (IE, have more than one network interface)======
For some odd reason, if only one interface is configured with WINS server information, it reports the IP Address of all the network interfaces on the Windows machine to the WINS Server.  IE, all the other network interfaces can have a blank / empty entry for WINS server, but that one network interface configured with a WINS server will report ''all'' of the IP Addresses associated with all of the other network interface.  To prevent this, configure a different WINS server for each interface OR "Disable NetBIOS over TCP/IP" (oddly, this does not disable the ability of one to access shared folders, incoming or outgoing, on the network interface in question as it seems NetBEUI is the acronym that encompasses that functionality).  This even includes PPTP VPN Connections and probably OpenVPN connections too.
For some odd reason, if only one interface is configured with WINS server information, it reports the IP Address of all the network interfaces on the Windows machine to the WINS Server.  IE, all the other network interfaces can have a blank / empty entry for WINS server, but that one network interface configured with a WINS server will report ''all'' of the IP Addresses associated with all of the other network interface.  To prevent this, configure a different WINS server for each interface OR "Disable NetBIOS over TCP/IP" (oddly, this does not disable the ability of one to access shared folders, incoming or outgoing, on the network interface in question as it seems NetBEUI is the acronym that encompasses that functionality).  This even includes PPTP VPN Connections and probably OpenVPN connections too.


===== Deprecated Configuration Directives from Samba3 to Samba4 =====
======Deprecated Configuration Directives from Samba3 to Samba4======
There are several configuration directives that have been removed / deprecated from Samba 4.  They include "announce as", "announce version", along with some others.
There are several configuration directives that have been removed / deprecated from Samba 4.  They include "announce as", "announce version", along with some others.
===== Other Information =====
If there is no Windows Domain Controller within a subnet, the following configuration is recommended for the /etc/dhcpd;<syntaxhighlight lang="text">
# This configures Samba to enable WINS support
wins support = yes
# The following settings will make the WINS functionality of Samba the main "Browser" for a subnet
# If using with a Windows Domain infrastructure, probably best to research a bit more before doing the following;
local master = yes
os level = 255
preferred master = yes
domain master = yes
</syntaxhighlight><br />

Revision as of 16:08, 23 March 2021

Invaluable Information from here: https://www.samba.org/samba/docs/using_samba/ch07.html (NOTE: This entire page is marked as "this is old information and might be incorrect", however, WINS is old too, and as it turns out, all of the information in regards to WINS is still accurate)

Samba Related Information
Samba Information

OpenWRT Samba is configured to look for the lmhosts file (all lower case) here: /etc/samba/lmhosts (it was verified by looking in the log files for where it loads the file)

Commands Related to WINS for Samba

nmblookup is the command that can be used to check information within the Samba WINS database.

Examples;

  • nbmlookup WhatEverNameOfHost will display the IP Address information for that host.
  • nbmlookup -S WhatEverWorkGroupName will display all the records*

* This webpage notes that there are various ways to display all of the records: https://superuser.com/questions/1492010/finding-all-samba-shares-in-local-network

Recommendation for Windows Hosts that are Multihomed (IE, have more than one network interface)

For some odd reason, if only one interface is configured with WINS server information, it reports the IP Address of all the network interfaces on the Windows machine to the WINS Server. IE, all the other network interfaces can have a blank / empty entry for WINS server, but that one network interface configured with a WINS server will report all of the IP Addresses associated with all of the other network interface. To prevent this, configure a different WINS server for each interface OR "Disable NetBIOS over TCP/IP" (oddly, this does not disable the ability of one to access shared folders, incoming or outgoing, on the network interface in question as it seems NetBEUI is the acronym that encompasses that functionality). This even includes PPTP VPN Connections and probably OpenVPN connections too.

Deprecated Configuration Directives from Samba3 to Samba4

There are several configuration directives that have been removed / deprecated from Samba 4. They include "announce as", "announce version", along with some others.

Other Information

If there is no Windows Domain Controller within a subnet, the following configuration is recommended for the /etc/dhcpd;

# This configures Samba to enable WINS support
wins support = yes
# The following settings will make the WINS functionality of Samba the main "Browser" for a subnet
# If using with a Windows Domain infrastructure, probably best to research a bit more before doing the following;
local master = yes
os level = 255
preferred master = yes
domain master = yes