Tokyo PC Users Group
	  Home Page
Members Only
Become a Member
Meeting Info & Map
Corporate Members
Workshops & Training
Other Clubs
Job Hunting?

My Server dances SAMBA (part 1)

by Kurt Keller

Samba - the definition

What is the first thing that comes to your mind when you hear "SAMBA?" I myself associate it with some kind of dance, presumably Latin. But let's see what Microsoft Bookshelf 98 has to say about it:

A Brazilian ballroom dance of African origin.

Well, my assumption was not bad. But, as my wife undoubtedly will assure you, I'm not at all knowledgeable about dance, so there must be another definition of SAMBA. Indeed there is. Just now I used SAMBA to look up the definition in Bookshelf. This lookup was done on my Win95 machine, while the CD actually is connected to a CD-ROM changer on my UNIX machine. And SAMBA made all this possible.

The Samba software suite is a collection of programs that implements the SMB protocol for unix systems. This protocol is sometimes also referred to as the LanManager or NetBIOS protocol.

This description is from the SAMBA(7) manpage on my unix machine. Samba, developed and maintained by Andrew Tridgell, is a great solution for a file and print server and it is available for free! This brings file and print servers in reach for corporations and individuals who do not have the funds for buying, setting up and maintaining expensive commercial solutions such as Novell Netware, IBM LanServer, WinNT etc. Running FreeBSD and Samba on an old 486-machine you might have left over from the last upgrade, you can implement file and print services for nothing more than the time spent on installation.

I must confess, I have not yet read much more than 10 percent of the documentation and I have not yet set up any print services, but I do have file sharing running for some time now. It is a robust solution and as I can see from the Samba mailing list, which I'm skimming a tiny little bit if time allows, this solution is also implemented in several company networks.

Even though I am not yet all too familiar with samba, you may want to follow me on my way to get some "brazilian beat" into my network. It might well save you a few trial and error session once you are the one to install it. Besides there is always some info about other software to be found too.

Samba Server on FreeBSD

At the office I maintain SUN machines running Solaris 2.x, but my own UNIX servers run FreeBSD. It's much cheaper; the OS is freely available and PCs are two magnitudes lower in price than SUN machines. Two more benefits of FreeBSD are access to source code and lots of knowledge and help on usenet.

Samba is available as a precompiled package for FreeBSD, either on the CD you buy or as a download from the net. (I do recommend to buy the FreeBSD CD, as it reduces installation time and telephone cost. Plus it can be a lifesaver once you make a stupid mistake and can't boot from the hard disk any more... [I speak from experience]) Installation is a snap; do a "make install" and watch it fly.

Configuration is done with a file called smb.conf. In this file you configure all the resources which should be made available by the machine acting as server. I have yet to read through the documentation for the configuration file, but examining the sample file I was able to build a configuration tailored to my needs. Once you edited your smb.conf file, you can check it for errors with the testparm program.

Finally smbd, the SMB (LanManager) daemon and nmbd, the NetBIOS nameserver daemon are started and your server is ready.

Samba client on OS/2

What caused me more headache than setting up the server, was the installation of the necessary client processes on my OS/2 powered notebook. Actually it is not difficult at all; to check it out I did it first on my test machine. All what is necessary is to install "NetBEUI over TCP/IP." (NetBEUI = NetBIOS Extended User Interface)

Install on the OS/2 notebook

My notebook is already an older generation; no CD-ROM can be connected (unless somebody gave me a SCSI PCMCIA card which works on my elderly but reliable notebook). OS/2 4.0 had been installed using a network connection from the test machine to the notebook. I set up the same environment again, to install the additional software component onto the notebook. So far so good. But when "NetBEUI over TCP/IP" was installed on my notebook, I found that the connection to the machine running samba came only up properly about once in three times booting. I tried various things, including deinstalling and reinstalling and finally made a mistake messing up the whole OS/2 setup I had on the notebook, which is my main working machine. I searched the web and found a copy of a news article saying that OS/2 did have some problems with starting the resolver process. The article also confirmed my own observations and resulting assumption, that it is a timing problem at boot time. A partial fix, not really fixing the problem, but making it appear less frequently was given as well: TCP/IP needs to come up before the requester for NetBEUI is started, which is quite logical, as I installed NetBEUI over TCP/IP. It's just that OS/2 seems not to have the same logic. So creating a file STARTUP.CMD in the root directory on OS/2's boot partition with the following line works well enough; I only need to boot twice once in a while.

if exist \tcpip\bin\tcpstart.cmd call \tcpip\bin\tcpstart.cmd

Having the necessary fix, I started installing OS/2 again. All the partitions containing any data as well as partitions with important software configurations etc. are kept in FAT, rather than OS/2's superior HPFS (High Performance File System). FAT partitions can be accessed from DOS and this way I was able to make a backup of everything I needed, even though OS/2 would not start any more. Even in the current Win-only and Win-everywhere times I still would not want to compute without DOS compatibility.

This time I decided not to do a network install any more, but connect the new external SCSI CD-ROM drive to the notebook directly, using some spare hardware from my toolbox. 98 percent of the time, I use my notebook with a mini-docking station, containing an ISA LAN card. Surely a much cheaper and simpler solution than buying and installing a PCMCIA adapter. The mini-docking station also has the advantage that, if necessary, I can connect other ISA cards. As there is only one ISA slot, I filled it with a riser card for the install and thus could connect both, the LAN and an Adaptec AHA-1520 SCSI board to which I then attached the CD-ROM drive. While having the riser card installed it was only possible to use the notebook at an angle of 90 degrees; screen flat on the table and keyboard straight up, but at least I was able to do an install direct from CD without having to buy lots of expensive hardware and fighting with ever evil device drivers.

Having SCSI in all computers, a spare SCSI board or two and mainly external SCSI devices is more expensive and can cause a lot of cable salad, but it can save you lots of time and money if you have several computer systems and devices which you only need to connect to some of the systems once in a while; the CD-ROM changer could be switched from the Win95 machine to the UNIX server in seconds, without opening any of the machines and it was recognized instantly without playing with any device drivers; the tape backup station can be switched between machines in seconds as well and the external CD-ROM drive is a tool I couldn't live without any more.

The whole install went fine (OS/2 is very well behaved, compared to Win95) and the TCP-before-NetBEUI fix works most of the time too. As the notebook is my main machine and also what I take with me if on a rare occasion, I'm out of town, all the applications installed are kept on the local drive, including all the data. But the new samba setup allows me to share drives with not only with the UNIX server, but also other machines. And I can also make the drives of the OS/2 notebook available over the network for access from the other computers.

Backup - a piece of cake now

Another plus is easier backup. Before I always needed to zip my drives up, make sure to either have enough free space on one of the local partitions to keep the whole zipfile and the temporary file produced while zipping or attach an Iomega ZIP drive and finally move everything to the server with ftp. If the zipfile was too big for storing on a local partition, the whole thing was even more troublesome, as I can not get OS/2 to recognize the ZIP drive: backup onto a ZIP disk, connect it to the Win95 machine and ftp the whole stuff from there onto the server.

What I do now is simply to mount a shared directory from the server on the client and zip directly to the shared directory. Backup was a big effort before, now it's a piece of cake; actually I'm doing it in the background right now, while writing this. It is even less of a performance killer than the old way was.

Simple backup also works on Win95, using the built in backup utility. I don't have WfW (Windows for Workgroups), but as far as I can tell it should also work there without any problems.

So far I can access resources on the server from the OS/2 machine and vice versa. The next step will be to set up English and Japanese Win95.

The Japanese part has been finished yesterday. Setting up Win95 to work with Samba is extremely simple. However, as I want to use the 4 GB SCSI disk from the test machine in the UNIX server, a completely new install of Win95 and all the other Operating Systems on the testmachine is necessary. This is also a good chance to try a few special configurations...

Read my next report if you plan something similar, it may well spare you a few grey hairs... business private

[Note from the publisher: SAMBA also comes with many (most?) Linux installations. When I set up Red Hat Linux, there was an option to install SAMBA. - Paul]

© Algorithmica Japonica Copyright Notice: Copyright of material rests with the individual author. Articles may be reprinted by other user groups if the author and original publication are credited. Any other reproduction or use of material herein is prohibited without prior written permission from TPC. The mention of names of products without indication of Trademark or Registered Trademark status in no way implies that these products are not so protected by law.

Algorithmica Japonica

February, 1998

The Newsletter of the Tokyo PC Users Group

Submissions : Editor

Tokyo PC Users Group, Post Office Box 103, Shibuya-Ku, Tokyo 150-8691, JAPAN