From: Sean E. <Sea...@by...> - 2002-03-06 15:14:23
|
First, let me say I'm not a very good perl programmer so my code may look like a hack, but I have a project that I'm working on that I can't quite figure out. I'm trying to make a web page where people can set their Active Directory password. I am using a Linux box to run my perl script on. I've tried using Net::LDAPS but every time it gets to that line in the script (the one where I do $ldaps =3D new Net::LDAPS etc), = it says file not found. This doesn't make any sense to me because LDAPS.pm is in the same place as LDAP.pm and it works fine. Here is the code I've been trying: =20 #!/usr/bin/perl -w local $^W =3D 0; no strict; require Net::SSLeay; Net::SSLeay::randomize('/dev/urandom'); require Net::LDAPS; =20 $ldap =3D new Net::LDAPS('ldapserver', verify =3D> 'require', certpath =3D> '/home/sean/mycert.cer', port =3D> 636) or die $!; =20 The only thing I can find is that LDAP.pm is in two places: =20 =20 /usr/lib/perl5/site_perl/5.005/Net/LDAP.pm /usr/lib/perl5/site_perl/5.005/Bundle/Net/LDAP.pm While LDAPS.pm is only in one: =20 /usr/lib/perl5/site_perl/5.005/Net/LDAPS.pm I doubt this is the problem, though, because if I change it from Net::LDAPS to Net::LDPS (just to see) it gives me a different error. Also, I exported the certificate from the Win2K server and I'm pointed to it in the code above. Is that the right thing to do? Do I need to do that at all? =20 I've used Net::LDAP quite a bit, but never Net::LDAPS. Can anyone help me? =20 Sean Eckton Brigham Young University =20 =20 =20 |