Setting "winbind separator" to '\' in smb.conf
Alison Winters
alisonw at sgi.com
Tue May 1 01:09:04 GMT 2007
Johann Hanne wrote:
> On Sunday 29 April 2007 18:36, simo wrote:
>> On Sun, 2007-04-29 at 13:01 +0200, Johann Hanne wrote:
>>> there is currently no obvious way to explicitly set the winbind separator
>>> to '\' in smb.conf. Even worse, the default given in the man page of
>>> smb.conf is wrong:
>> Have you tried: winbind separator = "\\" ?
> Just tried it with 3.0.25rc3. It results in the actual seperator being a
> double quote ("), and '\\' results in a single quote ('). As it seems that
> even a Samba insider falls about the smb.conf parsing, I feel assured that
> there should be an extra paragraph in the smb.conf man page explaining that a
> backslash is *NEVER* treated in a special way except for line continuation
> (that's why \\SERVER\SHARE is a valid notation) and that single/double quotes
> only have a special meaning with certain keywords (e.g. passdb backend).
>
I think this whole problem is symptomatic of the somewhat chaotic
handling of the smb.conf options. For instance, when Ed Plese and i
were discussing the shadow copy improvements, we needed to be able to
have literal percents (%) in the smb.conf file, but there is no standard
way to do this. %% does not work as expected. %[char] is treated as a
variable substitution, but only for certain options (i.e. those grabbed
with alloc_sub_basic and friends), and there's no obvious indication in
the manpages about which options do and don't get substitutions.
It would be nice if there was a clearly defined standard for what
certain characters meant in the config file - something that worked for
every option, not just on an undocumented case-by-case basis. An
example might be:
1. Options must fall into one of the following types:
BOOL
valid values: true/false/1/0/yes/no
INTEGER
valid values: [::digit::]+
STRING
valid values: any utf-8 chars, backslash is not significant
LIST
valid values: space-delimited STRINGs, backslash is only
significant to indicate non-breaking space or
to escape itself
The type for each option should be listed in the man page.
2. For STRING and LIST types, there is an additional type modifier of
variable substitution or not. For substitution-enabled types,
%% is interpreted as a literal percent. %[unknown-char] is an
error that will cause testparm to choke.
This also should be listed in the man page.
The above is just an example - i'm sure there are corner cases missing -
but i think the point stands. smb.conf options should be standardized
and all the documentation and code updated so it works predictably in
all cases.
Alison
More information about the samba-technical
mailing list