Mailing List CGatePro@mail.stalker.com Message #94236
From: Brian Gibson <bgibson@wheatonma.edu>
Subject: Re: PERL Script assistance, please
Date: Fri, 29 Feb 2008 11:38:48 -0500
To: CommuniGate Pro Discussions <CGatePro@mail.stalker.com>
I don't know if this applies but when you do LDAP over SSL you usually connect on a different TCP port than 389, I think it is usually 636. I think the code you have now says that if the $port variable is not set then use TCP 389.

Johnston, Wayne wrote:

I am trying to get the authLDAPnew.pl script to work with our Active Directory server.  The research I've done indicates that using the bind_s in NET::LDAPapi module should work more securly than the bind in NET::LDAP module.

 

The code snippets I'm using for this are:

 

16   use NET::LDAPapi

 

123  my $ldap = new Net::LDAPapi ($theServer->{address},port=>($theServer->{port} || 389),timeout=>($theServer->{timeout} || 20) )

 

254   my $result = $ldap->bind_s ($adminDN,password=>$adminPassword)

    || return "Can't bind as admin: ".$result->error;

 

This is the log for the process:

15:33:40.522 2 EXTAUTH program /var/CommuniGate/authLDAP.pl set
15:33:40.522 2 EXTAUTH receiver started
15:33:40.522 2 EXTAUTH launching /var/CommuniGate/authLDAP.pl
15:33:40.548 2 EXTAUTH '/var/CommuniGate/authLDAP.pl' launched
15:33:40.742 4 EXTAUTH inp(24): * authLDAPNew.pl started
15:34:04.197 5 EXTAUTH VXIMSSInput-92 starting initialization
15:34:04.197 4 EXTAUTH out(10): 82 INTF 8\n
15:34:04.198 4 EXTAUTH inp(9): 82 INTF 7
15:34:04.198 2 EXTAUTH interfaceLevel = 7
15:34:04.198 2 EXTAUTH inited
15:34:04.198 4 EXTAUTH out(112): 83 SASL(CRAM-MD5) waynejo@rmcnet.org ff476d80dcd057f6e107c9851a668494 "<92.1204320844@rmcnet.org>" [10.1.100.3]\n
15:34:04.199 4 EXTAUTH inp(34): * trying to connect to 10.1.100.55
15:34:04.204 2 EXTAUTH reading finished
15:34:04.204 1 EXTAUTH stderr: Name "main::ldap" used only once: possible typo at /var/CommuniGate/authLDAP.pl line 150.\nCan't call method "bind_s" without a package or object reference at /var/CommuniGate/authLDAP.pl line 254, <STDIN> line 2.\n
15:34:04.204 1 EXTAUTH reading failed: Error Code=external helper output closed
15:34:04.204 2 EXTAUTH task terminated. retCode=255
15:34:04.204 1 EXTAUTH aborting request 83
15:34:04.204 1 EXTAUTH failed: SASL(CRAM-MD5) waynejo@xxxxxx.xxx ff476d80dcd057f6e107c9851a668494 "<92.1204320844@xxxxxx.xxx>" [10.1.100.3]. Error Code=external helper aborted
15:34:04.204 1 EXTAUTH waynejo@xxxxx.xxx(XIMSS) password verification failed. Error Code=external helper aborted
15:34:04.204 1 ACCOUNT(waynejo) login(XIMSS) from [10.1.100.3] failed. Error Code=incorrect password
15:34:04.205 2 EXTAUTH receiver finished

 

Could someone with more than 15 min of PERL experience please tell me what I'm doing wrong?

 

Thank you

Wayne Johnston

Director, Information Services

Ripon Medical Center

 

 

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster