NSLU2-Linux
view · edit · print · history

HowTo.EnableWinsServer History

Hide minor edits - Show changes to markup

July 14, 2005, at 09:14 PM by RobHam -- domain master = yes - added to Wins Server Configuration Script
Changed lines 6-7 from:
  1. If no configurations exist then add the line wins support = yes
to:
  1. If no configurations exist then add the line wins support = yes (see revision notes below)
Changed line 36 from:

sed -i -e 's/\[global\]$/\[global\]\nwins support \= yes/' /etc/samba/smb.conf

to:

sed -i -e 's/\[global\]$/\[global\]\nwins support \= yes\ndomain master \= yes/' /etc/samba/smb.conf

Changed lines 50-57 from:
to:

Revision Notes

The script above has been changed to also add the line domain master = yes to the smb.conf file. Without this line the Wins server will function correctly but in LMB mode. In this mode, every 15 minutes the server will try and search out the networks DMB (domain master browser) and if none is found (it will only find one if a user has an NT server on there network configured as DMB) it will place an error report in the file /var/log/samba/log.nmbd which causes the file to grow to a very large size. Including the above line in the script will turn the NSLU2 into the networks DMB hence no errors are logged for this problem.

Users who do have an NT server configured as DMB need to delete \ndomain master \= yes from the script section.

RobHam - July 2005

May 22, 2005, at 10:12 PM by RobHam -- Small change to support Unslung ver 3.x and 4.x
Changed lines 8-9 from:

The Wins routing table will be generated and stored in the folder /var/lock/samba/wins.dat

to:

The Wins routing table will be generated and stored in the file /var/lock/samba/wins.dat

May 22, 2005, at 10:11 PM by RobHam -- Small change to support Unslung ver 3.x and 4.x
Changed lines 8-9 from:

The Wins routing table will be generated and stored in the Ram folder /var/lock/samba/wins.dat

to:

The Wins routing table will be generated and stored in the folder /var/lock/samba/wins.dat

May 22, 2005, at 10:09 PM by RobHam -- Small change to support Unslung ver 3.x and 4.x
Changed lines 1-2 from:

The NSLU2 firmware has a built in Wins server included as part of the Samba 2 module. This server function is disabled in the default firmware configuration but can easily be enabled using a simple diversion script. Copy the script rc.samba below to one of the unslung folders (recommend the disk folder /share/hdd/conf/unslung/) then re-boot.

to:

The NSLU2 firmware has a built in Wins server included as part of the Samba 2 module. This server function is disabled in the default firmware configuration but can easily be enabled using a simple diversion script. Copy the script rc.samba below to the /unslung/ folder (recommend the folder /share/hdd/conf/unslung/ for unslung firmware vers 3.x) then re-boot.

Deleted line 44:
April 17, 2005, at 08:29 AM by RobHam --
Changed lines 1-2 from:

The NSLU2 firmware has a built in Wins server included as part of the Samba2 module. This server function is disabled in the default firmware configuration but can easily be enabled using a simple diversion script. Copy the script rc.samba below to one of the unslung folders (recommend the disk folder /share/hdd/conf/unslung/) then re-boot.

to:

The NSLU2 firmware has a built in Wins server included as part of the Samba 2 module. This server function is disabled in the default firmware configuration but can easily be enabled using a simple diversion script. Copy the script rc.samba below to one of the unslung folders (recommend the disk folder /share/hdd/conf/unslung/) then re-boot.

Changed lines 49-51 from:

RobHam? - April 2005

to:

RobHam - April 2005

April 16, 2005, at 10:04 PM by RobHam --
Changed lines 1-2 from:

The NSLU2 firmware has a built in Wins server included as part of the Samba2 module. This server function is disabled in the default firmware configuration but can easily be enabled using a simple diversion script. Copy the script rc.samba below to one of the unslung folders (recommend the disk folder /share/hdd/conf/unslung/) then re-boot.

to:

The NSLU2 firmware has a built in Wins server included as part of the Samba2 module. This server function is disabled in the default firmware configuration but can easily be enabled using a simple diversion script. Copy the script rc.samba below to one of the unslung folders (recommend the disk folder /share/hdd/conf/unslung/) then re-boot.

Changed lines 6-9 from:
  1. If no configurations exist then add the line 'wins support = yes'

The Wins routing table will be generated and stored in the Ram folder /var/lock/samba/wins.dat

to:
  1. If no configurations exist then add the line wins support = yes

The Wins routing table will be generated and stored in the Ram folder /var/lock/samba/wins.dat

April 16, 2005, at 09:50 PM by RobHam --
Changed lines 15-44 from:
#! /bin/sh
# /unslung/rc.samba
# Diversion script: to modify the Samba smb.conf file
#
# Reason: to add or change Samba2 functionality
#
# Make sure we have a backup copy of /etc/samba/smb.conf
if [ ! -e /etc/samba/smb.conf.orig ]; then
cp -p /etc/samba/smb.conf /etc/samba/smb.conf.orig
fi
#
# Script section to enable the Samba built in Wins Server
#
# Check smb.conf for existing 'wins server' (remote Wins server)
# and 'wins support' (internal Samba Wins server) Configurations.
# If none present then insert line into [global] section
# to enable the built in Wins Server.
if ( !(grep "wins s" /etc/samba/smb.conf -q) ) then
sed -i -e 's/\[global\]$/\[global\]\nwins support \= yes/' /etc/samba/smb.conf
fi
#
# End of Wins Server script section
#
# Include other script sections below here
#
return 1
# EOF - include this line
to:

(:table border=0 width=100% bgcolor=#eeeeff:) (:cell:)

 
#! /bin/sh
# /unslung/rc.samba
# Diversion script: to modify the Samba smb.conf file
#
# Reason: to add or change Samba2 functionality
#
# Make sure we have a backup copy of /etc/samba/smb.conf
if [ ! -e /etc/samba/smb.conf.orig ]; then 
cp -p /etc/samba/smb.conf  /etc/samba/smb.conf.orig 
fi
#
# Script section to enable the Samba built in Wins Server
#
# Check smb.conf for existing 'wins server' (remote Wins server)
# and 'wins support' (internal Samba Wins server) Configurations.
# If none present then insert line into [global] section 
# to enable the built in Wins Server.
if ( !(grep "wins s" /etc/samba/smb.conf -q) ) then
sed -i -e 's/\[global\]$/\[global\]\nwins support \= yes/' /etc/samba/smb.conf
fi
#
# End of Wins Server script section
#
# Include other script sections below here
#
return 1
# EOF - include this line


(:tableend:)

April 16, 2005, at 03:17 PM by RobHam --
Changed lines 13-15 from:

Also note that there appears to be some annoying functionality built into the default Linksys firmware that appears to be designed to detect if the built in Wins server is active and if active to shut the server down (looks to be an attempt at a safe guard against configuring a server and client at the same time). The server will work fine after boot up of the NSLU2 but changing/adding shares, groups and users via the web pages etc and other configuration changes seems to invoke this function. In most cases this will cause little disruption to your LAN (Wins server support on a Lan usually an optional component). Note that the server can be re-enabled just by re-booting the NSLU2.

to:

Also note that there appears to be some annoying functionality built into the default Linksys firmware that appears to be designed to detect if the built in Wins server is active and if active to shut the server down (looks to be an attempt at a safe guard against configuring a server and client at the same time). The server will work fine after boot up of the NSLU2 but changing/adding shares, groups and users via the web pages etc and other configuration changes seems to invoke this function. In most cases this will cause little disruption to your LAN (Wins server support on a Lan is usually an optional component). Note that the server can be re-enabled just by re-booting the NSLU2.

April 16, 2005, at 03:15 PM by RobHam -- To Enable Wins Server - first draft
Added lines 1-47:

The NSLU2 firmware has a built in Wins server included as part of the Samba2 module. This server function is disabled in the default firmware configuration but can easily be enabled using a simple diversion script. Copy the script rc.samba below to one of the unslung folders (recommend the disk folder /share/hdd/conf/unslung/) then re-boot.

The script will:-

  1. Save a backup copy of the unchanged smb.conf file.
  2. Check the smb.conf file for existing Wins server and Wins client configurations.
  3. If no configurations exist then add the line 'wins support = yes'

The Wins routing table will be generated and stored in the Ram folder /var/lock/samba/wins.dat

Very Important Note... The http://www.samba.org web site gives a warning not to configure the Wins server and the Wins client (via the Web Configuration pages) at the same time, it will lock up part of Samba with possible disastrous consequences.

Also note that there appears to be some annoying functionality built into the default Linksys firmware that appears to be designed to detect if the built in Wins server is active and if active to shut the server down (looks to be an attempt at a safe guard against configuring a server and client at the same time). The server will work fine after boot up of the NSLU2 but changing/adding shares, groups and users via the web pages etc and other configuration changes seems to invoke this function. In most cases this will cause little disruption to your LAN (Wins server support on a Lan usually an optional component). Note that the server can be re-enabled just by re-booting the NSLU2.

#! /bin/sh
# /unslung/rc.samba
# Diversion script: to modify the Samba smb.conf file
#
# Reason: to add or change Samba2 functionality
#
# Make sure we have a backup copy of /etc/samba/smb.conf
if [ ! -e /etc/samba/smb.conf.orig ]; then
cp -p /etc/samba/smb.conf /etc/samba/smb.conf.orig
fi
#
# Script section to enable the Samba built in Wins Server
#
# Check smb.conf for existing 'wins server' (remote Wins server)
# and 'wins support' (internal Samba Wins server) Configurations.
# If none present then insert line into [global] section
# to enable the built in Wins Server.
if ( !(grep "wins s" /etc/samba/smb.conf -q) ) then
sed -i -e 's/\[global\]$/\[global\]\nwins support \= yes/' /etc/samba/smb.conf
fi
#
# End of Wins Server script section
#
# Include other script sections below here
#
return 1
# EOF - include this line

RobHam? - April 2005

view · edit · print · history · Last edited by RobHam.
Originally by RobHam.
Page last modified on July 14, 2005, at 09:14 PM