Samba openSUSE & Windows: HowTo Quickly Diagnose Configuration Problems in your SOHO Workgroup.
[This is also a learning tool on how to setup Linux / Windows workgroups / networks]

Versions: Suse Linux 10.x, openSUSE 10.x

Also tested it in SLES 10 SP2 just for interest.The script is unknown to Novell and is unsupported in any way by Novell.

Don't use this script for openSUSE 11.x. I probably won't extend this. I'm thinking of creating an alternative for use in 11.2, where the script simply configures Samba with the aid of a question/answer session; something like that.

A simple script, compiled into a Linux executable, makes a non-invasive investigation of your Samba settings and produces a report which advises appropriate remedial action for any deficiencies the script discovers. The script does not alter any files. It only looks into Suse's configuration files and makes recommendations based on what it sees. The focus is on a SOHO Workgroup with Samba using Broadcast Name Resolution. The script does not work for Domain Controllers.

You can help the development of these Open Source tools for Samba in openSUSE. See the end of the page for details.

The script checks and advises on the following areas for a workgroup using broadcast name resolution:

  • Samba software (RPMs) installed
  • Status SuSEfirewall2 & Samba daemons running
  • Network interfaces active
  • Trusted IP network resolved
  • Network interfaces are in the firewall's external zone
  • Check UDP ports 137 & 138. TCP ports 139 & 445
  • Check outward broadcasts on ports 137 & 138
  • Check broadcast replies on UDP port 137 (Trusted IPs)
  • Workgroup name & netBIOS hostname defined
  • Domain controller/s & domain membership not configured
  • Name resolve order correct
  • Local master browser & preferred master appropriately configured
  • Wins server & wins client not configured
  • Samba user database entries exist

Installation: The software is a single executable file named sscw (for Swerdna's Samba Checker for Workgroups). I compiled the script into a Linux executable to prevent people doing their systems harm by altering it and then running it. It is available for download on this site in compressed form: sscw.tar.gz (click to download). Uncompress the tar.gz file and you will get a directory "sscw_1.x" containing a copy of this html file for reference plus the single executable file "sscw". You can extract the package with the various GUI extractors availabe from Konqueror, Nautilus & Dolphin, or you can extract from the command line with this command:

tar -xf sscw.tar.gz

Caution: the file sscw travels poorly over Windows/Linux networks, sometimes having it's executable bit and permissions modified in transit. It's advisable to transport the file in the form sscw.tar.gz and extract it when it reaches its destination.

Running the application. There are no interdependencies with other files; sscw was compiled to be fully self contained. To run the script simply open a console window at the directory holding the file and enter this command:

su root -c ./sscw

You'll be asked for a password. Supply the root password (Nothing will be written to your system files). The script will execute, placing a report on Samba's status and configuration into the directory sscw_1.x. The report is named "report.txt".

Uninstallation: There's only one file with no dependencies. To unistall the application, simply delete the directory "sscw_1.x".

Typical results: FYI, I have linked the document report.txt for two cases. One is report.txt when the LAN is configured correctly for every variable investigated by the script. The other is report.txt when the LAN is configured incorrectly for some of the more typical cases.

Questions and other help: You can get further assistance on the script in the Networking Forum at the official openSUSE Forums. Open a new thread, ask your question and alert me using the bulletin board's PM function or email me a heads-up using this address: email png.

You can help: The script is sure to have errors and omissions; it cannot hurt your system because it doesn't write to it. I would really like to view the product (report.txt) over the next month or two if you would kindly email a copy to me. Please assist development by reporting bugs (or indeed report anything you like) in an email using the address in the blue graphic just above. If you have suggestions for improvement, email those too or make a constructive comment in the Comments form at the end of the page. I really appreciate your help.

Licence: Copyright: Open Source software under the GNU GPL.

To Do list

  • Add options for wins server, lmhosts and /etc/hosts (not just broadcast)
  • Add option to skip all firewall considerations
  • Add analysis of whether ping by server_name is enabled
  • Add options to automatically fix misconfigurations

Hope this Script gets you up and running with Samba fast.

Swerdna: 15 September 2008.