Built-in Services: The Sharing Panel

Mac OS X includes many built-in services that are based on common open source servers such as Samba, Apache, and OpenSSH. Although you can enable and disable these using the Sharing preference panel (System Preferences Sharing), there’s not much configuration you can do there. This section describes each of these services and what you can do to customize them to your liking.

Personal File Sharing

This option controls the AppleTalk Filing Profile (AFP) service, and corresponds to the AFPSERVER entry in /etc/hostconfig (see Chapter 2 for more information on hostconfig ). When you enable Personal File Sharing, your Mac shares your Home directory and any mounted volumes (including external drives) with the connected machine.

Windows File Sharing

This option turns on the Samba service, and toggles the disable entry in /etc/xinetd.d/nmbd (NetBIOS name server for resolving Windows server names) and /etc/xinetd.d/smbd (the server that handles Windows file sharing).

On Mac OS X, Samba hooks into Open Directory for user authentication. Because of this, you don’t need to use smbpasswd to set the password for someone logging into your Mac from a Windows machine; users can authenticate themselves by using their login username and password.

You can add a new share by editing /etc/smb.conf , and adding an entry. For example, you could share your Applications directory with this entry:

[Applications]
path = /Applications
read only = yes

Next, use the command ...

Get Mac OS X Panther for Unix Geeks, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.