Linux on HP Integrity Servers: A System Administrators Guide

 < Day Day Up > 

Samba Web Configuration Tool (SWAT)

SWAT is a Web-based administration tool for Samba. It is easy to configure and provides a simple interface for most Samba configuration tasks. On your Red Hat Linux system, the following steps had to be performed to get SWAT running. If you have a different UNIX variant, your steps will be different.

Edit the file /etc/xinetd.d/swat and change disable to no as shown in the following listing:

# default: off # description: SWAT is the Samba Web Admin Tool. Use swat \ # to configure your Samba server. To use SWAT, \ # connect to port 901 with your favorite web browser. service swat { port= 901 socket_type= stream wait = no only_from = 127.0.0.1 user= root server= /usr/sbin/swat log_on_failure+= USERID disable= no }

Restart xinetd with the following command:

# /sbin/service xinetd restart

From your browser, specify a location of localhost:901 and enter the root user and password when prompted for them.

Figure 11-5 shows the SWAT interface. It includes links for HOME, GLOBALS, SHARES, PRINTERS, STATUS, VIEW, and PASSWORD and documentation on several important Samba topics.

Figure 11-5. SWAT Showing Initial Window

From this point, you can view your current configuration and make configuration changes to Samba.

When you select STATUS, you are shown the information in Figure 11-6.

Figure 11-6. SWAT STATUS

You get such useful information as the state of the smbd and nmbd daemons, the Active Connections, and Active Shares.

There is also extensive online documentation for all Samba-related software at www.samba.org.

Samba Utilities and Programs

You have used several Samba utilities and programs in this chapter. The following list gives a description of the most often used Samba-related commands. There are manual pages for all these, which are part of most Samba installations:

  • smbd - This daemon provides file and print services to SMB clients, such as the Windows system used in the examples throughout this chapter.

  • nmbd - This daemon provides NetBIOS name server capability and browsing.

  • smbclient - A program that gives the server access to remotely mounted SMB shares on other servers.

  • testparm - A test program for /etc/smb.conf.

  • smbstatus - Program that displays status information about current Samba connections.

  • smbpasswd - Program used to change a user's SMB password on the local machine.

  • smbrun - Program that runs shell commands for smbd.

  • smbtar - Program to back up SMB shares directly to a UNIX tape drive.

  • smbmount - Used to mount an SMB file system.

  • smbumount - Used to unmount an SMB file system.

The online manual pages for these and other Samba-related commands provide more detail. Even in a simple setup, such as the one performed in this chapter, you want to run some of these programs.

Obtaining Samba

In the examples used throughout this chapter, we set up Samba on a Linux system that had Samba installed on it as part of the Red Hat 8.x Linux CD-ROM. Samba is included on the Red Hat Advanced Server distribution that is supplied with HP Integrity server. If Samba does not come on the CD-ROM provided with your UNIX variant, or if you want to be sure that you're loading the very latest Samba, you can obtain Samba from the Web.

www.samba.org is the place to start. From this Web site, you can select a "download site" in your country. You can also select "Web sites" on www.samba.org that provides a wealth of information on Samba, including the GNU General Public License mentioned earlier in this chapter.

There is extensive documentation on Samba-related Web sites, including detailed descriptions of the programs that I listed earlier and used in this chapter.

If you decide to download Samba, you'll probably be given an option of loading a precompiled Samba on your system or building and compiling Samba yourself. The choice you make depends on a lot of factors. If you have a good, reliable Samba distribution, as we did in this chapter when working with Red Hat Linux, working with a precompiled Samba may be best. If you're interested in learning more about how Samba works and is configured, and want the very latest and greatest version, download the source and compile it yourself.

Even if you have a great prepackaged Samba, as we did in this chapter, it is still worth visiting the Samba-related Web sites to view the extensive documentation available.

     < Day Day Up > 

    Категории