Mail Systems on Linux

amba (like Apache and Linux itself) is a success story for Free and Open Source software that has its origins in the early 1990s.

Samba takes its name from the letters SMB, which stand for Server Message Block. SMB is a protocol for sharing files, printers, and other resources across a network. The SMB protocol dates back to an IBM document from 1985. SMB working together with Network Basic Input/Output System (NetBIOS) and NetBIOS Extended User Interface (NetBEUI) was adopted by Microsoft as its method of providing shared resources over the network, and became the standard for Microsoft Windows.

Reference documents for SMB were issued by X/Open (now the Open Group), and although SMB is closely associated with Microsoft, it has always been, at least in part, publicly documented.

SMB was renamed Common Internet File System (CIFS) by Microsoft in 1996 and, at the same time, Microsoft issued a draft RFC describing the protocol. However, the draft RFC never became an official standard.

As PCs running DOS and early versions of Windows became common, the need for an SMB server running on Unix or Unix-like systems was commonly felt, and various commercial implementations were made available. Samba originally started life in 1992 as a quick hack by Andrew Tridgell, who wanted to run a DOS application that required the NetBIOS interface to talk to remotely mounted storage.

IN THIS CHAPTER

Setting up and using a Samba client

Setting up a Samba server

Using Winbind

Samba command-line utilities

The Samba configuration file

Using SWAT, Samba's web configuration tool

By looking at packets on the network, he reverse-engineered the SMB protocol and wrote a Unix implementation so the DOS application could write its files on the Unix machine. According to his own account, he left the matter there until nearly two years later, when he found that he could use the same code to provide for file sharing between his Linux machine and his wife's Windows computer. At the same time, he discovered that SMB and NetBIOS were, in fact, documented, although by no means fully. Working both with the documentation and by looking at the network packets produced by the (rather different) reality of Microsoft's implementation of the protocols, he produced and published a newer version of his server, which was named Samba.

SMB is such a *horrible* protocol it can't be properly documented, as the real spec for SMB is

"what Windows clients do on the wire."

— Jeremy Allison

Because Samba filled a widely felt need at the time (a need that is still apparent), it was widely taken up and others took an interest in joining the project (most notably, Jeremy Allison). Samba became widely used as a way of providing file and print services to Windows clients on the network. As was also the case with Apache, the popularity of Samba also helped to drive early adoption of Linux, although, of course, both of these projects were available on a wide range of Unix-like operating systems. Samba is now developed as an open source project, published under the GPL, by a team of more than 30 programmers across the world.

In this chapter, we look at how to run a Samba client on Linux to share resources that are being offered by a Windows server. We then look at how to set up a Samba server that provides file and print services on the network for Windows clients.

Was this article helpful?

0 0

Post a comment