Linux Networking: Exploring Samba - page 2
The Samba Essentials
The Samba server daemon, smbd, will be running in the background after Samba is installed and the system has been rebooted. The nmbd service falls into the same category. The services can also be started manually if you do not want to reboot the computer.
When the service starts, it reads the
/etc/smb.conf file that
specifies a variety of attributes such as the computer name in addition to a
list of shared resources that include shared directories and printers. Each
shared directory has a number of attributes associated with it including what
local directory is to be shared, who can access the share and who can view the
share. A shared printer has similar attributes although there is no directory
associated with the attributes.
It is possible to edit the smb.conf file directly. Many network administrators prefer this method but the average desktop user will prefer a more interactive graphical interface. With Red Hat, and its derivatives such as Linux Mandrake, there is a configuration tool called linuxconf. The linuxconf program is used to configure all sorts of things in Linux, including the Samba server as shown in Figure 2.
There are a number of attributes that must be configured for Samba to operate properly. These include the server's NetBIOS name and the workgroup name. The workgroup name is also known as the Windows domain name, not be confused with the computer's domain name used with DNS. The type of security should also be selected--but more on security later. At this point the Samba server is configured but no shares have been created.
Disk shares can also be created using linuxconf. Each share is given a name. It also needs the path name of the directory that will be shared. The share has its own security settings, too. The share can be marked browsable, in which case it can be viewed from another computer using a network browser. Connections to a nonbrowsable share must be made using the UNC.
The smb.conf configuration is a text file that can be edited. The linuxconf program actually changes this file. The following is an excerpt from the file just in case you want to edit the file directly:
#=== Global Settings === [global] # workgroup = NT-Domain-Name or Workgroup-Name workgroup = bill-pa # server string is the equivalent of the NT Description field server string = Linux
The word global in brackets is a section name. The lines with pound signs, #, are comments. The other lines are attributes with associated values. In this case the workgroup name is bill-pa.
If Samba is already running, changes made using linuxconf will be noted when linuxconf signals the daemon to recheck the configuration file. Use the Samba online help if you want to do this after editing the configuration file. The easy alternative is to reboot.
Another way to configure the Samba server is to use the Samba Web Administration Tool, or SWAT, shown in Figure 3. SWAT works with a web server such as Apache. Both run on the same computer as Samba. SWAT tends to be used with servers and is overkill for most workstation environments.
There are a number of other configuration tools available for Samba. These range from configuration scripts to graphical interfaces like SWAT. Links to many of these tools can be found on the Samba web site.
Once the Samba server or a Windows server is configured, the Samba client software can be used to access these services from another Linux computer.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 2Linux Top 3: Debian Dumps SPARC, Ubuntu Takes Over Linux 3.13 and the Core Infrastructure Initiative
- 3Linux Top 3: Fedora, Ubuntu and Gluster Lose Community Leaders
- 4Red Hat Enterprise Linux 7 Finally Hits the Big Time
- 5Linux Top 3: Tails 1.0, OpenMandriva Lx 2014.0 and Debian 7.5