LIS 525 - Samba

What Is Samba?

Samba is a suite of programs that allows Windows clients to access a Unix/Linux server's filespace and printers. This means, for example, that you can connect to UNIX/Linux disks and printers from Windows clients.

Samba uses the SMB and CIFS protocols. SMB (Server Message Block) is a client server, request-response protocol for sharing files, printers, serial ports, and communications abstractions (such as pipes) between computers. All Windows (95 or better) machines are capable of running SMB. CIFS (Common Internet File System) is a specification based on SMB for a file access protocol for the Internet.

The two key programs in Samba are smbd (SMB Daemon) and nmbd, which implement the four basic CIFS services:

Name resolution and browsing basically involve management and distribution of lists of NetBIOS names. For name resolution, a machine may broadcast a call for a service with a given name and wait for that machine to answer with an IP address or it may use an NBNS (NetBIOS Name Service) (called WINS, Windows Internet Name Service, in Windows) server, where machines can have left their name and IP address. Browsing refers to a browsable list of services (file and print shares) offered by the computers on a network. One machine on a LAN is designated as LMB (Local Master Browser), whose job is to keep a list of available services.

One of the utilities that is included in Samba is nmblookup, which can be used to find NetBIOS names on a network, look up their IP addresses, and query a remote machine for its list of names.

Accessing a Samba Server

In Windows, a common way of accessing a samba server is through drive mapping. This mapping should occur automatically for the UWO Samba server when MLIS students log in to the FIMS LAN. Otherwise the following method can be used. Select "Map Drive" in Control Panel or Windows Explorer; type \\ + the server name + \ + your user name (e.g., \\samba.uwo.ca\jdoe) in the "Path" box and click on "OK"; if this is your first access to the Unix area in this session, enter your password and click on "OK". You can drop this kind of connection by selecting "Disconnect" in Control Panel or Windows Explorer, selecting the virtual drive from the list, and clicking on "OK". There are at least two conditions to making this kind of access work.
  1. Your user name (though not your password) should be the same on both the Windows machine and the Unix/Linux machine (this is the normal FIMS setup, but user names might be different if you are trying to access a Samba server elsewhere).
  2. For older Samba servers Windows 98 needs to be set to allow unencrypted passwords. One way to do this is to run Regedit.exe and change the EnablePlainTextPassword value under "VNSETUP" to 1; but note that there is a potential security risk.

Unix/Linux and DOS/Windows plain text files differ very slightly. The Unix/Linux convention is to end each line with just a line feed character (ASCII #10); in DOS/Windows each line ends with a carriage return plus line feed sequence (ASCII #13 plus ASCII #10). Some Windows programs, such as PFE, will recognize which kind of file they are dealing with, and PFE will even allow you to choose which convention to follow. Other Windows programs, however, such as Notepad, read Unix/Linux files more literally. This means that, for example, if you open a plain text file created in Unix/Linux in Windows using Notepad, all the lines will appear jammed together as a single line (or paragraph, if Word Wrap is on), sometimes with little black squares between them.

For More Information


Home

Last updated April 16, 2007.
This page maintained by Prof. Tim Craven
E-mail (text/plain only): t.craven@uwo.ca
Faculty of Information and Media Studies
University of Western Ontario,
London, Ontario
Canada, N6A 5B7