CMSC 691X – Summer 2002 Project By Pravin D’Souza
What is Samba?? Samba is an Open Source Suite, that provides seamless file and print services to SMB/CIFS clients. Samba is freely available. With Samba, you can share a Linux filesystem with Windows 95, 98, 2000 and NT and vice versa. You can also share printers connected to either Linux or a system with Windows 95, 98, 2000 or NT. Samba enables a Linux or Unix server to function as a file server for client PCs running Windows software.
What is SMB? SMB stands for – Server Message Block. It is a protocol by which a lot of PC-related machines share files and printers and other information such as lists of available files and printers. Operating systems that support this natively include Windows NT, OS/2, and Linux. What is CIFS? CIFS – Common Internet File System is a protocol that is basically an updated SMB.
Components of SMB smbd daemon: This provides the file and print services to SMB clients such as Windows NT or other Linux or Unix clients. smb.conf: This is the configuration file for smbd. nmbd daemon: This daemon provides NetBIOS nameserving and browsing support. smbclient: This is an smb client program that implement a simple FTP-like client on a Linux or Unix box. smbmount: This mounting program enables mounting of server directories on a Linux or Unix box.
Continued… testparm: This utility is used to test the smb.conf configuration file. smbstatus: This programs lists the current Samba connections. SWAT: Swat allows a Samba administrator to configure the smb.conf file via a Web browser. smbpasswd: This allows the user to change the password used for their SMB sessions.
Installation and Setup The Samba Server package can be downloaded from the Samba website. The file needs to be untared and then configured using a./configure command in the source directory. Then the smb.conf file should be created. The smb.conf file has three separate sections: [global] : This section controls parameters for the entire SMB server. It also provides default values for the other sections. Examples: workgroup = MYGROUP server string = Samba Server
Continued… hosts allow = printcap name = /etc/printcap load printers = yes guest account = pcguest encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd [homes]: This section allows network clients to connect to a user’s home directory without having an explicit entry in the smb.conf file. Examples: [homes] browseable = no writeable = yes
Continued… [printers]: This section is used to specify which printers are available. Examples: [printers] print ok = yes printer name = lp_mine path = /home/everyone The testparm program helps in testing the smb.conf file once it is configured.
Testing with a Linux Client: # smbclient ‘// /homes’ –U myuid Testing with a Windows Client: A Linux computer shows up in Windows network neighborhood. The name attached to ‘workgroup’ in the [global] section shows up in the network neighborhood.
Sharing files and print services: Example of directory or file share: [jacksdir] comment = Jack’s remote source code directory path = usr/local/src valid users = tackett browseable = yes public = no writeable = yes Example of printer sharing: [vals_lp] print ok =yes printer name = lp_mine path = /home/everyone valid users = browseable = yes