oreilly.comSafari Books Online.Conferences.


O'Reilly Book Excerpts: Using Samba, 2nd Edition

Running Samba on the Mac OS X Server

Related Reading

Using Samba
By Jay Ts, Robert Eckstein, David Collier-Brown

by Robert Eckstein, David Collier-Brown, Jay Ts

Editor's note: Leon Towns-von Stauber contributed the material in this excerpt on "Running Samba on the Mac OS X Server" for Appendix F of Using Samba, 2nd Edition.

Mac OS X Server is an Apple operating system product based on Mac OS X, with the addition of administrative tools and server software. One area in which it differs from Mac OS X is in the configuration of Samba-based services. In this appendix, we'll tell you how to set up SMB file and printer shares, enable client user access, and monitor activity. Our specific focus is on Mac OS X Server 10.2.

Setup Procedures

The first thing to note is that the procedure described in Chapter 2 using System Preferences to enable Samba does not apply to Mac OS X Server. Unlike Mac OS X, the Sharing pane of System Preferences does not include an option to turn on Windows File Sharing. Instead, there is a set of applications to configure, activate, and monitor services: Workgroup Manager, Server Settings, Server Status, and Open Directory Assistant, all located in the directory /Applications/Utilities.

TIP: In addition to being installed with Mac OS X Server, these and other administrative applications are included on a separate installation CD-ROM sold with the operating system. They can be used to manage Mac OS X Server systems remotely from any Mac OS X machine.

For more information, refer to the Mac OS X Server Administrator's Guide, included as a PDF file in the /Library/Documentation/MacOSXServer directory, and also downloadable from Apple Computer's web site at

Briefly, the procedure for setting up SMB file and printer shares is as follows:

  1. Designate share points in Workgroup Manager for file sharing.

  2. Set up print queues in Server Settings for printer sharing, and activate Printer Service.

  3. Configure and activate Windows Services in Server Settings.

  4. Activate Password Server and enable SMB authentication in Open Directory Assistant.

  5. Enable Password Server authentication for user accounts in Workgroup Manager.

  6. Monitor file and print services with Server Status.

Sharing Files

The first step to enable SMB file sharing is to designate one or more share points. Share points are folders that form the root of shared volumes for any of the protocols supported by Mac OS X Server: Apple Filesharing Protocol (AFP), Network Filesystem (NFS), File Transfer Protocol (FTP), and SMB.

To designate a share point, launch Workgroup Manager. You will be prompted for the local or remote server's hostname or IP address, as well as for a username and password; this process is required by all the Mac OS X Server administrative applications. Once Workgroup Manager is open, click the Sharing button in the toolbar. The list on the left, under the Share Points tab, displays currently defined share points. To add a new one, click the All tab, and navigate to the folder you want to share.

On the right, under the General tab, check the box labeled Share this item and its contents, change the ownership and permissions if desired, then click the Save button. Next, under the Protocols tab, select Windows File Settings from the pop-up menu, and ensure that the box labeled Share this item using SMB is checked. At this point, you can also decide whether to allow guest access to the share, change the name of the share displayed to SMB clients, or set permissions for files and folders created by SMB clients. Click the Save button when you're finished making changes. See Figure F-1.

Figure F-1. Workgroup Manager: Share Points and Windows File Settings
Figure F-1

Sharing Printers

Printer shares are set up differently. First, launch Server Settings; under the File & Print tab, select Print, then Configure Print Service.... Check the box labeled Automatically share new queues for Windows printing. Next, click the Print icon again and then Show Print Monitor. Make sure the printers you want to share are listed. Printers directly attached to the server should have queues created automatically, but remote printers you wish to reshare must be added by clicking New Queue and discovering or specifying the printers. When you're finished, click Save, select the Print icon one more time, and select Start Print Service. See Figure F-2.

Figure F-2. Server Settings: Print Service
Figure F-2

TIP:   Server Settings will make local printers available for sharing only if they're PostScript compatible. Unfortunately, many printers, including consumer-grade USB inkjet printers, aren't. If you want to make one of these printers available to SMB clients, you can still add the share to /etc/smb.conf yourself with a text editor. See "Rolling Your Own" later in this chapter for instructions and caveats related to making manual changes to smb.conf.

Configuring and Activating Services

At this point, neither the file shares nor the printer shares are available to SMB clients. To activate them, click the Windows icon in Server Settings, and click Configure Windows Services.... Under the General tab, you can set the server's NetBIOS hostname, the workgroup or Windows NT domain in which the server resides, and the description that gets displayed in a browse list. You can also specify the code page for an alternate character set. Finally, you can enable boot-time startup of Samba. See Figure F-3.

Figure F-3. Server Settings: Windows Services
Figure F-3

The Windows Services Access tab offers options to enable guest access and limit the number of simultaneous client connections; under the Logging tab, you can specify the verbosity of your logging. With options under the Neighborhood tab, you can configure your machine as a WINS client or server or have it provide browser services locally or across subnets.

When you've finished configuring Windows Services, click the Save button, then click the Windows icon in Server Settings, and select Start Windows Services. This starts the Samba daemons, enabling access from SMB clients.

Pages: 1, 2

Next Pagearrow

Sponsored by: