1 Reply Latest reply: Nov 16, 2007 9:15 AM by jorgar
alazarevich Level 1 Level 1 (0 points)
We've got 10.5 Server, running as an OD master, and Samba PDC. My question is about forcing Samba settings in the smb.conf on OSX 10.5 Server.

As some of you may know, Samba has hundreds of options on how it functions. These options are normally specified in the smb.conf file. When the samba process runs (smbd), it first looks at the smb.conf and the options specified in the file tell the smbd process how to function. Many things can be specified in the smb.conf, things like what the home drive is mounted as (H:, or Z:), what the different shares are, what the samba server name is, etc etc.

OS X 10.5 uses the smb.conf which is in /var/run/smb.conf. However, whenever I edit this file, and restart samba, the file is overwritten and none of my changes are kept.

The options that are specified in the GUI interface in the Server Admin are only the very basic options, and I have to specifiy other options. For example, we do NOT want roaming profiles, we want local profiles. You force local profiles by setting the logon path to nothing: "logon path = ". However, whenever I set /var/run/smb.conf logon path to nothing, it is immediately changes back to "logon path = \\profiles...", thus forcing roaming profiles. Additionally, we want the home drive to be mounted as Z:, not H:, but this is another setting that seems to be forced upon us.

So, my question is, how do I force changes in the smb.conf file. There is also a smb.conf in /etc, but editing this file seems to do nothing.

By the way, in 10.4 Server, the /etc/smb.conf totally works fine, you can edit changes to it and they stick. Why did Apple change this behavior?

Thanks in advance,


Xserve, Mac OS X (10.4.10), OSX Server
  • jorgar Level 1 Level 1 (10 points)
    /var/run/smb.conf is dynamically generated from system settings. It is owned by the system and changes to it will not stick.

    Any changes you want to make yourself can be made in /etc/smb.conf. Read the comments in this file, there is a section that is reserved for system use but outside that section you are free to add your own settings. If you do this it is your responsibility to make sure that the new setting play nicely with the existing ones.