By Jay Schulist, TurboLinux
July 6, 2001
Samba, an open-source software suite, provides seamless file and print services to Windows (SMB/CIFS) clients. We'll show you how to install and configure a guest Samba server. I recommend the following configuration for the home user behind a firewall. I don't recommended using it in a publicly available network.
Before you can use Windows networking in Linux you must install the Linux Samba software package, available from
Samba.org.
The easiest way to install Samba is through the use of the RPM program. Download the following RPMS from the /pub/samba/bin-pkgs/TurboLinux directory.
samba-2.0.4b-19990519.i386.rpm
samba-debugtools-2.0.4b-19990519.i386.rpm
Su to user root, then install the packages using the following command(s):
# rpm -ivh samba-2.0.4b-19990519.i386.rpm
# rpm -ivh samba-debugtools-2.0.4b-19990519.i386.rpm
Now that the Samba software is installed you need to start the Samba server to use SWAT to configure it to your environment.
# /etc/rc.d/init.d/smb start
Now you're now ready to configure Samba.
Configure Samba
SWAT (Samba Web Administration Tool) lets you configure Samba remotely from anywhere in the world using a browser. You configure Samba using the smb.conf configuration file. This is a text file designed to look like a standard *.ini file used by Windows.
SWAT requires a browser. You also need to log in to the Samba server via the Web. From the Linux server with Samba installed, start a Netscape session within Xwindows. Enter the following URL to login.
http://localhost:901
A login window will appear that requires you to enter a User ID and Password. Enter the User ID root and the respective password for root on your Linux server.
After entering the correct user name and password you will be taken to the SWAT homepage. The homepage includes a centrally located area of detailed documentation on how to use each feature of Samba.
Proceed to the Globals section of SWAT to set up the Samba server.
Set Up the Samba Server
Set the following options.
Workgroup: Set the name of the Windows Workgroup as you would like it to appear in the Network Neighborhood or set the name to an already existing workgroup.
Netbios Name: Set this to the name you wish to appear in Netbios Name Lookups, this name needs to be eight characters or fewer and contain no spaces.
Server String: Any additional information you would like to provide about this Samba server.
Security: Set this option to User if it is not already set by default.
Guest Account: This sets up a guest user account. If this is left blank the default user of nobody will be used. For this setup you may leave this blank.
Select Commit Changes to save your changes to the smb.conf file.
Proceed to the Shares section of SWAT to setup file volumes to share.
In the Create Share box enter the name of the new share (Test, for example) and press the Create button. You will now be taken to a screen to provide more detailed information. Set the following variables to enable a guest volume.
Guest OK: Set to Yes.
Select Commit Changes to save your changes to the smb.conf file.
Go to the Printers section of SWAT to set up printers to share.
Set Up Printers
The screen will require you to select the printer to configure. To share all printers configured on the Linux server select printers from the drop-down box. Then select the Choose Printer button. Set the following options to allow guests to print.
Guest OK: Set to Yes.
Browseable: Set to Yes.
Select Commit Changes to save your changes to the smb.conf file.
You may now view the changes to the smb.conf file by selecting the View button.
Your changes should appear similar to the following.
# Samba config file created using SWAT
# from localhost (127.0.0.1)
# Date: 2000/03/06 15:38:02
# Global parameters
[global]
workgroup = TURBONET
server string = TechTV Test Server
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
guest ok = yes
print ok = yes
[Test]
path = /tmp
guest ok = yes
Enable the Configuration and Test
Now restart the Samba Server to enable the new configuration. Select the Status button from the Menu Bar, you will now be viewing a screen that lets you restart smbd and nmbd. Restart both of these by selecting the Restart Smbd and Restart Nmbd buttons.
You are now ready to test the Samba server with your Windows client. From the Windows workstation open the Network Neighborhood. An icon with the name of the Linux server should appear. Open this icon and you will see each volume and printer that is being shared from the Samba server. You are now able to copy, execute, and print to the Samba server from your Windows client.