Installation guide

Chapter 11.
Samba
Samba uses the SMB protocol to share files and printers across a network connection. Oper-
ating systems that support this protocol include Microsoft Windows (through its Network
Neighborhood), OS/2, and Linux.
11.1. Why Use Samba?
Samba is useful if you have a network of both Windows and Linux machines. Samba will
allow files and printers to be shared by all the systems in your network. If you want to share
files between Red Hat Linux machines only, refer to Chapter 10. If you want to share printers
between Red Hat Linux machines only refer to Chapter 21.
11.2. Configuring Samba
Samba uses /etc/samba/smb.conf as its configuration file. If you change this configuration
file, the changes will not take effect until you restart the Samba daemon with the command
service smb restart.
The default configuration file (smb.conf) in Red Hat Linux 7.3 allows users to view their
Linux home directories as a Samba share on the Windows machine after they log in using
the same username and password. It also shares any printers configured for the Red Hat
Linux system as Samba shared printers. In other words, you can attach a printer to your Red
Hat Linux system and print to it from the Windows machines on your network.
To specify the Windows workgroup and description string, edit the following lines in your
smb.conf file:
workgroup = WORKGROUPNAME
server string = BRIEF COMMENT ABOUT SERVER
Replace WORKGROUPNAME with the name of the Windows workgroup to which this machine
should belong. The BRIEF COMMENT ABOUT SERVER is optional and will be the Windows
comment about the Samba system.
To create a Samba share directory on your Linux system, add the following section to your
smb.conf file (after modifying it to reflect your needs and your system):
[sharename]
comment = Insert a comment here
path = /home/share/
valid users = tfox carole
public = no
writable = yes
printable = no
create mask = 0765
The above example allows the users tfox and carole to read and write to the directory
/home/share, on the Samba server, from a Samba client.