Lab 10 - Samba

Samba Lab

Samba provides file and printer sharing for Windows workstations. In this lab we will look at providing these services to windows clients from a Linux server. (Samba also provides software to connect from a Linux client to windows servers.)

  1. Log in as root (or su -).
  2. If Samba is not installed, install it. We will be using SWAT as well so we need 3 packages: samba-common (disk 1), samba (disk 1), and samba-swat (disk 3). (An easy way to check is to use the command rpm -qa | grep samba)
  3. Red Hat provides a default configuration file at /etc/samba/smb.conf. It is a good idea to copy config files before starting. Make a copy called smb.conf.orig. Have a look through this config file. We will use SWAT to configure Samba which will remove all the comments from this file.
  4. Use chkconfig to turn on smb and swat. Start the smb service. SWAT runs as an xinetd process so we don't need to start it.
  5. In order to access SWAT from a network connected computer you must edit the xinetd config file for swat. Edit the file /etc/xinetd.d/swat and comment out the line only_from. Restart xinetd. This will allow computer to connect to SWAT.
  6. Add a user student to your Linux server. You do not need to set a Linux password for this user unless you want the user to be able to log in to Linux. Samba will keep its own password for Window's shares.
  7. Log in to the Windows computer as student (with the password student) and start a web browser. Go to http://root@YourServerIP:901. (The root@ only seems to be required in MSIE, other browsers will know to ask.) Enter your Linux server root user name and password. Click on Globals and set the WORKGROUP to LAB80B and netbios name to your_server_name (this must be unique on the network).
    SWAT Global Section
  8. When you change the Workgroup and name you will have to restart NetBios on the Linux server. Click on Status and click on Restart nmbd.
  9. The home directory is already shared by default. Set up at least one other share (such as Tmp). Click on Shares and add a share called TMP:
    Add a New Share

    Add a comment and set Read Only to No:
    Configure The New Share
  10. Click on Password and add the user student with the password student to Samba.
    Add a New Samba User
  11. From your Windows computer connect to the Samba share on your Linux server. Copy a file to the Linux server and make sure you can read it back.
  12. Click on Status and note that you have a connection to your Samba server.
  13. Have your work checked by the instructor.