Additional Samba Topics


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 our Red Hat Linux system, the following steps had to be performed to get SWAT running. If you have a different UNIX variant, then 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 15-8 shows the SWAT interface. It includes links for HOME, GLOBALS, SHARES, PRINTERS, STATUS, VIEW, and PASSWORD and documentation on several important Samba topics.

Figure 15-8. SWAT Showing Initial Window

graphics/15fig08.jpg

From this point we can view our current configuration and make configuration changes to Samba.

When we select STATUS, we are shown the information in Figure 15-9:

Figure 15-9. SWAT STATUS

graphics/15fig09.jpg

We 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

We 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 is the daemon that provides file and print services to SMB clients , such as the Windows system used in our examples throughout this chapter.

  • nmbd - This is the daemon that 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 will 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 Linux CD-ROM. If Samba does not come on the CD-ROM provided with your UNIX variant, or if you wish to be sure that you're loading the very latest Samba, then 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, which provides a wealth of information on Samba, including the GNU General Public License mentioned earlier in the 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, then 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, then 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.



HP-UX 11i Systems Administration Handbook and Toolkit
HP-UX 11i Systems Administration Handbook and Toolkit (2nd Edition)
ISBN: 0131018833
EAN: 2147483647
Year: 2003
Pages: 301

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net