The Samba-Bugzilla – Bug 2334
[patch] pgsql passdb case sensitive for machine accounts
Last modified: 2006-02-10 08:42:03 UTC
Using the pgsql passdb, the lookups for machine accounts are case sensitive (a
mere string equal comparison). This looks like a regression on previous behavior.
The attached patch solves this by lowercasing the account previous to a lookup.
We would like the patch to be incorporated into the tree, so if any change is
required for that, please let me know.
Thanks & kind regards.
Created attachment 963 [details]
Lowercases username before DB lookup.
How does this patch make sure that current names in the database are already
*** Bug 1996 has been marked as a duplicate of this bug. ***
(In reply to comment #2)
> How does this patch make sure that current names in the database are already
I doesn't. Maybe it should be documented or a constraint added to the schema
(something like username=lower(username))?
Samba will attempt to add non-lowercased names so a constraint wouldn't work...
(In reply to comment #5)
> Samba will attempt to add non-lowercased names so a constraint wouldn't work...
A trigger then (doing it in the database is good in this case because it
provides consistency independently of the input method. Ie, somebody can have
their own tool to populate the DB).
Created attachment 1201 [details]
Trigger to lowercase usernames on insert/update.
The experimental pdb modules (pdb_mysql, pdb_pgsql and pdb_xml) have
been a bit neglected during the last few releases of Samba 3 as they
haven't been actively maintained. I was the original author and
maintainer, but I no longer work on Samba 3 and I no longer use any of
the modules in production. I was hoping I could nonetheless keep the code
working for those that still use it, but this turned out to be harder then I
I'll remove these modules unless somebody steps up as a maintainer. If
there's anyone willing to take over maintainance of either one of
these modules, please let me know. Otherwise, I'll put the modules up
on my samba.org homepage as a separate tarball for those interested
(including some of the patches that have been published).
See bug 3375. If someone wants to maintain these modules outside
the Samba source tree, that is fine. But the source has been removed
from the upcoming 3.0.22 release.