Contents |
---|
File Server |
Setup |
Maintenance |
Conclusion |
Resources |
File Server
Now that Sam had speeded up the Internet access considerably, the hobbits began spending more time exploring the Internet. Soon they were downloading freeware, shareware, trial programs, MP3s, etc. that very quickly saturated the bandwidth and slowed Internet access. Dismayed by this situation, Sam tried to figure out a way he could reduce the load.
Sam noticed that most hobbits downloaded the same programs, MP3 songs, etc. The bandwidth could be saved considerably if he could create a central repository of downloaded programs and songs, where hobbits could check for a file before attempting to download it. If a hobbit downloaded something useful that he thought could be of use to others, he could put it into the repository so that others could save themselves the trouble of having to download it. The repository could be organised into categories that could make searching simpler and faster.
Most of the hobbits worked on Microsoft Windows NT based computers, while some worked with Microsoft Windows 98. The most natural way to access a repository on these machines was using Windows shares (using NetBIOS). Sam wanted to set up the repository on his Intranet server that was running Linux. He wondered if there was a way the Windows machines could access this server as if it were another Windows machine.
Here is where the superlative Samba came
to Sam's rescue. He read up the
excellent book Using
Samba, and of course, the online
manual pages and the central repository was up quite soon.
He also read the Linux SMB HOWTO, but it was not necessary
this time - the other sources of information were more than
sufficient for his purpose.
Setup
The workstations in the company did not belong to a particular
Windows Domain - by convention, all of the workstations belonged
to the “HOBBITWARE
” Windows WorkGroup. This
considerably eased the effort needed to set up the file server.
Sam downloaded Samba 2.2.0 sources from one of the mirrors,
and compiled and installed it. By default, it installed itself
in “/usr/local/samba
”. The
configuration file “smb.conf
”, had
to be provided in the “lib
” sub-folder
(he had to write one himself since there was no default, though
there were a lot of sample configuration files).
Sam wrote the configuration file as given in the manual pages.
There were a lot of options he could play with and tweak. Sam always
had the excellent Samba tool “testparm
”
that could verify the configuration file after a modification.
After a bit of experimentation, Sam came up with the following
working Samba configuration file:
[global] workgroup = HOBBITWARE security = share server string = Hobbitware Intranet Server lm announce = yes lm interval = 900 netbios name = INSERVER [Downloads] comment = Repository of downloaded files path = /dump/Downloads guest ok = yes read only = yes [Uploads] comment = Upload your files here path = /dump/Uploads guest ok = yes writeable = yes
This configuration file made the Intranet server advertise
itself over NetBIOS as “INSERVER
” belonging
to the common workgroup. This enabled it to be visible
in the “Network Neighbourhood” of the Windows
workstations used by the hobbits.
The server exposed two shares - “Downloads”, through which the hobbits could access the repository, and “Uploads”, through which they could submit newly downloaded files. Sam requested them to supply a short description and a suggested category for cataloguing, whenever they uploaded a file. Sam periodically scanned the uploads area and moved the files into the appropriate category, except on the rare occasions that he rejected a file.
After Sam was satisfied with the way it worked, he added
the Samba daemons
“/usr/local/samba/bin/smbd
” and
“/usr/local/samba/bin/nmbd
” to the
system startup scripts.
Maintenance
Aside from the maintenance of the repository itself, Samba
required very little interference from Sam. He was very
happy with the way it performed without adversely affecting
the performance of the Intranet server itself.
Conclusion
The common repository solution enabled the hobbits to rapidly
get the files they wanted without having to wait for
excruciatingly slow downloads, if the file was already there.
The file server worked perfectly and once again, Internet
access was speeded up.
Resources
The following resources proved immensely helpful to Sam during the file server setup:
- Samba: The excellent server solution for Linux that helped the Intranet server masquerade as a Windows machine. Sam used the version 2.2.0 of this software.
- Linux SMB HOWTO: A good set of documents that explains how to set up Samba on Linux.
- Using Samba: The excellent book that explained how Windows shares worked, how Samba worked and how to set it up properly. Sam found this book immensely useful and practical.