From: <ma...@mj...> - 2001-02-08 18:17:19
|
You don't have to write this yourself, I've already done it for you ;). Check out my AuthNetLDAP module either on CPAN or at http://courses.unt.edu/mewilcox/ I also have an AuthzNetLDAP module which can handle group level access. Mark On 7 Feb 01, at 11:32, Dworatzek Damian wrote: > ...authentication does not work. > > > > Hi, > > I am facing a problem with perl-ldap. > > We are running Netscape products (iplanet and Directory Server) > and I need to connect an apache server running on an > linux box to our ldap server (database). > > The procedure should be, that the user identifies himself with an > user-id and a passwort. If the authentification is done and true, the > script proofs his membership to a group. > > State of the art is, that the groupmembership-proof works, the > authentication not. > > The script attached is my test script, conecting to ldap database and > reading out all the specific data of an user (in this case a dummie). > > With > > my $mesg =3D $ldap->bind; > > I connect to the ldap-server as ananoumys. > > With (which is currently inactive #) > > my $mesg =3D $ldap->bind("uid=3D$user,$base", password =3D> "tes= t"); > > the script should sign in the user under his passwort. > > Unfortunately, no matter what user and what passwort is being passed, > the script loggs in (such as with anonymous) > > Everybody having an idea ? > > Thanks for the help in advance. > > > ----script starts here ---------------- > > #!/usr/local/bin/perl -w > > use Net::LDAP; > > > $user =3D 'iuai2'; > > > local $base =3D "o=3Dsv-versicherungen"; > local $filter =3D "uid=3D$user"; > local $host =3D "dir1.svi.de"; > > > > > > my $ldap =3D new Net::LDAP( "$host"); > > #my $mesg =3D $ldap->bind("uid=3D$user,$base", password =3D> "test"); > my $mesg =3D $ldap->bind; > > $mesg =3D $ldap->search ( > base =3D> $base, > filter =3D> $filter > ); > > > $mesg->code && die $mesg->error; > > if ($mesg->count =3D=3D 0) { > print "No Row Found \n"; > } > > foreach $entry ($mesg->all_entries) {$entry->dump;} > > $ldap->unbind; > > __END__ > > -- > Mit freundlichem Gru=DF > > > Damian Dworatzek > Assistent der Gesch=E4ftsf=FChrung > Sparkassen-Versicherung > Baden-W=FCrttemberg Informatikdienste GmbH (SVI) > dam...@sv... > www.svi.de Mark Wilcox ma...@mj... Got LDAP? |