Setting "winbind separator" to '\' in smb.conf
jhml at gmx.net
Mon Apr 30 09:36:03 GMT 2007
On Sunday 29 April 2007 18:36, simo wrote:
> On Sun, 2007-04-29 at 13:01 +0200, Johann Hanne wrote:
> > Hi,
> > 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:
> > winbind separator = '\'
> > This will actually set the separator to a single quote ('). Similarly,
> > winbind separator = "\"
> > will set it to a double quote ("). People may also think that
> > winbind separator = \\
> > works. And yes, the separator will be \ indeed, but the next line in the
> > config file will have no effect, because it's taken as continuation of
> > the winbind separator line.
> > One way that works is
> > winbind separator = \garbage
> > but imho this is not really obvious.
> > Thus, this should either either be fixed so that '\' and "\" both work as
> > expected, or the problem should be described in the man page!
> > Comments, please?
> 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).
> However, being it the default, all you need to do is to remove the
> parameter :)
Yes, that's why I wrote "no obvious way to EXPLICITLY set the winbind
separator". In my experience, relying on the default is not always a good
idea. If you heavily rely on a parameter being set to a certain value, it's
usually wise to set it in a configuration file even it's the default.
It's ok for me if you insist on the current behaviour, but then the smb.conf
man page is still wrong, as it says:
Default: winbind separator = '\'
The Default is \, and this directive would set it to '. And even worse, it
suggests that it's ok to enclose the character in quotes which is wrong, too.
If you keep the current behaviour, the man page must explain that the default
is something like
winbind separator = \garbage
So maybe it's better to allow both '\' and "\".
If we agree on a solution, I'm willing to write a patch. Just let me know what
you think about it.
More information about the samba-technical