From: Dworatzek D. <dam...@sv...> - 2001-02-07 10:33:16
|
...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 = $ldap->bind; I connect to the ldap-server as ananoumys. With (which is currently inactive #) my $mesg = $ldap->bind("uid=$user,$base", password => "test"); 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 = 'iuai2'; local $base = "o=sv-versicherungen"; local $filter = "uid=$user"; local $host = "dir1.svi.de"; my $ldap = new Net::LDAP( "$host"); #my $mesg = $ldap->bind("uid=$user,$base", password => "test"); my $mesg = $ldap->bind; $mesg = $ldap->search ( base => $base, filter => $filter ); $mesg->code && die $mesg->error; if ($mesg->count == 0) { print "No Row Found \n"; } foreach $entry ($mesg->all_entries) {$entry->dump;} $ldap->unbind; __END__ -- Mit freundlichem Gruß Damian Dworatzek Assistent der Geschäftsführung Sparkassen-Versicherung Baden-Württemberg Informatikdienste GmbH (SVI) dam...@sv... www.svi.de |