F.2 Configuration Details

   

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 ).

[1] In versions of Mac OS X prior to 10.2, Open Directory domains were called NetInfo domains. NetInfo Manager (located in /Applications/Utilities ) provides a graphical interface to view and modify the contents of Open Directory databases. For more information, see the Mac OS X Server Administrator's Guide , as well as Understanding and Using NetInfo , downloadable from the Mac OS X Server resources web page at http://www.apple.com/server/resources.html.

Figure F-7. NetInfo Manager: SMBServer properties
figs/sam2_af07.gif

Table 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

Server Settings graphical element in Windows Services

Open Directory property in /config/SMBServer

Samba global parameter in /etc/smb.conf

General Server Name

netbios_name

netbios name

General Workgroup

workgroup

workgroup

General Description

description

server string

General Code Page

code_page

client code page

General Start Windows Services on system startup

auto_start

N/A

Access Allow Guest Access

guest_access , map_to_guest

map to guest

N/A

guest_account

guest account

Access Maximum client connections

max_connections

max smbd processes

Logging Detail Level

logging

log level

Neighborhood WINS Registration Off

WINS_enabled , WINS_register

wins support

Neighborhood WINS Registration Enable WINS server

WINS_enabled

wins support

Neighborhood WINS Registration Register with WINS server

WINS_register , WINS_address

wins server

Neighborhood Workgroup/Domain Services Master Browser

Local_Master

local master

Neighborhood Workgroup/Domain Services Domain Master Browser

Domain_Master

domain master

Print Start Print Service

printing

N/A

N/A

lprm_command

lprm command

N/A

lppause_command

lppause command

N/A

lpresume_command

lpresume command

N/A

printer_admin

printer admin

N/A

encryption

encrypt passwords

N/A

coding_system

coding system

N/A

log_dir

N/A

N/A

smb_log

log file

N/A

nmb_log

N/A

N/A

samba_sbindir

N/A

N/A

samba_bindir

N/A

N/A

samba_libdir

N/A

N/A

samba_lockdir

N/A

N/A

samba_vardir

N/A

N/A

stop_time

N/A

   


Using Samba
Using Samba: A File and Print Server for Linux, Unix & Mac OS X, 3rd Edition
ISBN: 0596007698
EAN: 2147483647
Year: 2003
Pages: 475

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