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.)
- Log in as
root(orsu -). - 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), andsamba-swat(disk 3). (An easy way to check is to use the commandrpm -qa | grep samba) - 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 calledsmb.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. - Use
chkconfigto turn on smb and swat. Start thesmbservice. SWAT runs as anxinetdprocess so we don't need to start it. - 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/swatand comment out the lineonly_from. Restartxinetd. This will allow computer to connect to SWAT. - Add a user
studentto 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. - Log in to the Windows computer as
student(with the passwordstudent) and start a web browser. Go to http://root@YourServerIP:901. (Theroot@only seems to be required in MSIE, other browsers will know to ask.) Enter your Linux server root user name and password. Click onGlobalsand set the WORKGROUP toLAB80Band netbios name to your_server_name (this must be unique on the network).
- When you change the Workgroup and name you will have to restart NetBios on the Linux server. Click on
Statusand click onRestart nmbd. - The home directory is already shared by default. Set up at least one other
share (such as Tmp). Click on
Sharesand add a share calledTMP:

Add a comment and set Read Only to No:
- Click on
Passwordand add the userstudentwith the passwordstudentto Samba.
- 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.
- Click on
Statusand note that you have a connection to your Samba server. - Have your work checked by the instructor.