Underneath the GUI, a lot of activity takes place to offer Windows Services. In the non-Server version of Mac OS X, selecting Windows File Sharing sets the SMBSERVER parameter in /etc/hostconfig and triggers the Samba startup item. In Mac OS X Server, under normal circumstances the Samba startup item and the SMBSERVER parameter are never used. Instead, a process named sambadmind generates /etc/smb.conf from the configuration specified in Server Settings and Workgroup Manager and handles starting and restarting the Samba daemons as necessary. The sambadmind process is in turn monitored by watchdog , which keeps an eye on certain processes and restarts those which fail. The watchdog utility is configured in /etc/watchdog.conf , a file similar to a System V inittab , which specifies how the services under watchdog 's purview are to be treated. For example, the line for sambadmind looks like this: sambadmin:respawn:/usr/sbin/sambadmind -d # SMB Admin daemon Using a watchdog -monitored process such as sambadmind to start the Samba daemons, instead of a one-time execution of a startup item, results in more reliable service. In Mac OS X Server, if a Samba daemon dies unexpectedly, it is quickly restarted. (Examples of other services monitored by watchdog are Password Server, Print Service, and the Server Settings daemon that allows remote management.) There's another wrinkle in Mac OS X Server: the Samba configuration settings are not written directly to /etc/smb.conf , as they are in the non-Server version of Mac OS X. Instead, they're stored in the server's local Open Directory domain, [1] from which sambadmind retrieves them and regenerates smb.conf . For example, the Samba global parameters are stored in /config/SMBServer (see Figure F-7). Share point information is also kept in Open Directory, under /config/SharePoints , while CUPS takes responsibility for printer configuration in /etc/cups/printers.conf (also creating stub entries used by Samba in /etc/printcap ).
Figure F-7. NetInfo Manager: SMBServer propertiesTable F-1 summarizes the association of Windows Services settings in the Server Settings application, properties stored in Open Directory, and parameters in /etc/smb.conf . Table F-1. Samba configuration settings in Mac OS X Server
|