CVS update: samba/source/passdb
simo.sorce at polimi.it
Tue Nov 28 14:56:36 GMT 2000
On Tue, 28 Nov 2000, Gerald Carter wrote:
> Simo Sorce wrote:
> > On Tue, 28 Nov 2000, Gerald Carter wrote:
> > > "Anders C. Thorsen" wrote:
> > > >
> > > > Does anyone know if ldap supports case-insensitive searches?
> > >
> > > Yes.
> > So it is possible to make username searches on samba
> > pasdb backend and then on local passwd trusting the
> > passdb backend stored username.
> I was only replying to the question about LDAP. If your getpwnam()
> calls are also case insensitive (in the case of using nss_ldap),
> the yes the entire thing is case insensitive. However, if you are using
> the standard nss_files distributed with Linux and man UNIX variants,
> then it will be a case sensitive match.
> Follow me?
Yes, but i was referring to my previous e-mail in wihch I propose to test
username against samba passdb (smbpasswd, tdb, ldap)..., we may make an
easy case insensitive search on smbpasswd, tdb and (now) ldap.
So instead of trying many getpwnam() to match the username, we may simply
match case insensitive on samba backends and then use the stored usrname,
trust it and make a single getpwnam(), if it fails give up.
we receive ADMINISTRATOR username.
make a case insensitive search on the file (we need to make a custom
routine to do that), it will match Administrator, use it as the correct
username and call getpwnam() with that username, if it fails username is
search USER_administrator (we need to always save the username part of the
key in lower case).
get SAM_ACCOUNT -> username field and call getpwnam() trusting that
like tdb, make a case insensitive search and then retrieve the correct
case username (is it possible?)
In any case we reduce the getpwnam() calls to 1 (is lowercase name is
found) or 0 (name not found in passdb).
Is there something wrong with this scheme?
Simo Sorce - Integrazione Sistemi Unix/Windows - Politecnico di Milano
E-mail: simo.sorce at polimi.it
Tel.int: 02 2399 2425 - Fax.int. 02 2399 2451
Be happy, use Linux!
More information about the samba-technical