F.3 Rolling Your Own

   

When making manual changes to the Samba configuration file, take care to block changes initiated from graphical applications by invoking this command:

 #  chflags uchg /etc/smb.conf  

From that point on, the GUI will be useful only for starting, stopping, and monitoring the service ”not for configuring it.

If you install your own version of Samba, you can still manage it from Server Settings by changing some of the Open Directory properties in /config/SMBServer .

To do this, open NetInfo Manager and modify the samba_sbindir and samba_bindir properties to match the location of your Samba installation. Optionally, you can modify samba_libdir , samba_vardir , and samba_lockdir . Assuming a default Samba installation, you can also change these at the command line with the following commands:

 #  nicl . -create /config/SMBServer samba_sbindir /usr/local/samba/bin  #  nicl . -create /config/SMBServer samba_bindir /usr/local/samba/bin  #  nicl . -create /config/SMBServer samba_libdir /usr/local/samba/lib  #  nicl . -create /config/SMBServer samba_vardir /usr/local/samba/var  #  nicl . -create /config/SMBServer samba_lockdir /usr/local/samba/var/locks  

You can check your settings with this command:

 #  nicl . -read /config/SMBServer  

In Server Settings, select Stop Windows Services, then run this command:

 #  killall sambadmind  

The watchdog utility restarts sambadmind within seconds. Finally, go back to Server Settings, and select Start Windows Services.

If you don't modify Open Directory properties to match your active Samba installation (because you wish to manage your configuration another way), be sure never to activate Windows Services from the Server Settings application, or you'll wind up with two sets of Samba daemons running concurrently.

   


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