Sams Teach Yourself Samba in 24 Hours

ContentsIndex

Hour 4: Installing and Testing the Configuration

Previous HourNext Hour

Sections in this Chapter:

 

Configuring the [global] Section of smb.conf

Before actually configuring any of the network shares needed to solve the problem, I must configure some initial settings to get Samba up and running. To provide some background, SMB shared resources, whether they are directories or printers, are often referred to as shares. This is the equivalent of an NFS-exported directory or remote printer made available via lpr. Sometimes an SMB share is also called a service. I use the terms interchangeably.

To begin, I must answer the following two questions:

For this example, assume that the hostname of the server is eagle and, therefore, the NetBIOS name of the server has been chosen to be EAGLE as well. Although the names are not case sensitive, a convention I will follow through this book is to refer to DNS hostnames in lowercase and NetBIOS names in uppercase. The workgroup will be the same as the one of which the PCs are a member, which is FOWLPLAY. Hour 5, "The smb.conf File: Telling Samba What to Do," goes into more detail about these decisions and associated smb.conf parameters.

After these two choices have been made, I can configure the initial settings in the smb.conf file. Comments in smb.conf are preceded by a ; or a # character.

; smb.conf's global parameters section
[global]
    ; set the netbios machine name for the server
    netbios name = EAGLE
    ; set the workgroup membership
    workgroup =  FOWLPLAY
    ; set Samba to authenticate in user mode security
    security = user

The comments are fairly self explanatory. The line security = user determines the mode of security that Samba uses to validate users. More details about user authentication can be found in Hour 6, "Security Levels and Passwords."

If you remember from Hour 3, the default location for smb.conf is in /usr/local/samba/lib/, which is what I will use. Using my favorite text editor (vi), I create /usr/local/samba/lib/smb.conf and enter the text from the previous code listing.

Sams Teach Yourself Samba in 24 Hours

ContentsIndex

Hour 4: Installing and Testing the Configuration

Previous HourNext Hour

Sections in this Chapter: