Windows, Linux And Samba
Samba is a suite of utilities that allows your Linux box to share files and other resources such as printers with Windows boxes. This chapter describes how you can make your Linux box into a Windows Primary Domain Controller (PDC) or a server for a Windows Workgroup. Either configuration will allow everyone at home to have:
> their own logins on all the home windows boxes while having their files on the Linux box appear to be located on a new Windows drive
> shared access to printers on the Linux box
> shared files accessible only to members of their Linux user group.
What’s the difference between a PDC and Windows Workgroup member? A detailed description is beyond the scope of this chapter, but this simple explanation should be enough.
> A PDC stores the login information in a central database on its hard drive. This allows each user to have a universal username and password when logging in from all PCs on the network.
> In a Windows Workgroup, each PC stores the usernames and passwords locally so that they are unique for each PC.
This chapter will only cover the much more popular PDC methodology used at home. By default, Samba mimics a Windows PDC in almost every way needed for simple file sharing. Linux functionality doesn’t disappear when you do this. Samba Domains and Linux share the same usernames so you can log into the Samba based Windows domain using your Linux password and immediately gain access to files in your Linux user’s home directory. For added security you can make your Samba and Linux passwords different.
When Samba starts up it reads the configuration file /etc/samba/smb.conf to determine its various modes of operation. You can create your own smb.conf using a text editor or using the easier web based SWAT utility. Keep in mind that you will lose all your comments inserted in /etc/samba/smb.conf with a text editor if you subsequently use SWAT to edit it. Explanations of how to use both SWAT and a text editor to configure Samba are given in this chapter.
Download and Install Packages
Most RedHat and Fedora Linux software products are available in the RPM format. Downloading and installing RPMs isn’t hard. If you need a refresher, Chapter 5, the RPM chapter, covers how to do this in detail.
Samba is comprised of a suite of RPMs that come on the Fedora CDs and have the following names:
> samba
> samba-common
> samba-client
> samba-swat
When searching for the file, remember that the RPM’s filename usually starts with the RPM name followed by a version number like this: samba-client-3.0.0-15.i386.