|
Up |
|
|
Author: Chris DukesChris Dukes
Date: Dec 24, 2008 06:57
Hi,
I'm using Net::LDAP and Net::LDAP::LDIF to extract a subset of the data
from our corporate LDAP server for use in our test LDAP server.
I'm getting a bit of an anomaly when DNs contain UTF 8 characters
and "encode => 'canonical'" on creating the ldif file for writing.
If there is no UTF8 in the DN the dn: line of the ldif entry looks
proper... IE
dn: cn=Tognoni team,ou=metadata,ou=corpgroups,o= corp.com
When it contains UTF 8 characters, the dn: portion is missing
CN=Driftsplanlægning Risskov,OU=metadata,OU=corpgroups,O= corp.com
The base64 CN is
cn:: RHJpZnRzcGxhbmzDpmduaW5nIFJpc3Nrb3Y=
For now I'm just going to change the encoding to none or base64.
However, having the DN multibyte escaped may make the ldif files a bit
more user friendly.
Thanks,
--
Chris Dukes
"In cynicism she's about 35" -- Terry Pratchett's "Hog Father"
|
|
|
no comments
|
|
|
Author: coudotcoudot
Date: Sep 12, 2008 08:14
> Clément OUDOT a écrit :
>>> Hello list.
>>>
>>> I've been trying to use a PasswordPolicy control with a password change
>>> operation, in order to nicely handle constraints violations in server
>>> response.
>>>
>>> my $pp = Net::LDAP::Control::PasswordPolicy->new();
>>>
>>> my $result = $ldap->set_password(
>>> user => $dn,
>>> newpasswd => $new_password,
>>> control => [ $pp ]
>>> );
>>> if ($result->code == LDAP_CONSTRAINT_VIOLATION) {
>>> my $resp = $result->control(LDAP_CONTROL_PASSWORDPOLICY);
>>> print $resp->error() if defined $resp;
>>> }
>>>
>>> $resp is never defined, and all I can do is to print raw ...
|
Show full article (1.96Kb) |
|
2 Comments |
|
|
Author: coudotcoudot
Date: Sep 12, 2008 07:41
> Hello list.
>
> I've been trying to use a PasswordPolicy control with a password change
> operation, in order to nicely handle constraints violations in server
> response.
>
> my $pp = Net::LDAP::Control::PasswordPolicy->new();
>
> my $result = $ldap->set_password(
> user => $dn,
> newpasswd => $new_password,
> control => [ $pp ]
> );
> if ($result->code == LDAP_CONSTRAINT_VIOLATION) {
> my $resp = $result->control(LDAP_CONTROL_PASSWORDPOLICY);
> print $resp->error() if defined $resp;
> }
>
> $resp is never defined, and all I can do is to print raw
> $result->message() to the user, whereas I'd like to distinguish between ...
|
Show full article (1.28Kb) |
1 Comment |
|
|
Author: Guillaume RousseGuillaume Rousse
Date: Sep 12, 2008 07:24
Hello list.
I've been trying to use a PasswordPolicy control with a password change
operation, in order to nicely handle constraints violations in server
response.
my $pp = Net::LDAP::Control::PasswordPolicy->new();
my $result = $ldap->set_password(
user => $dn,
newpasswd => $new_password,
control => [ $pp ]
);
if ($result->code == LDAP_CONSTRAINT_VIOLATION) {
my $resp = $result->control(LDAP_CONTROL_PASSWORDPOLICY);
print $resp->error() if defined $resp;
}
$resp is never defined, and all I can do is to print raw
$result->message() to the user, whereas I'd like to distinguish between
different case, for translations purpose mainly.
|
Show full article (0.97Kb) |
6 Comments |
|
|
Author: coudotcoudot
Date: Sep 3, 2008 01:47
> Would help if I attached it :-)
>
Ok, I confirm this one is working! Do you plan to release it soon?
And have you a visibility on the uploading of perl-ldap packahe into main
Linux distributions?
Thanks for your precious help.
Clément OUDOT.
|
|
1 Comment |
|
|
Author: coudotcoudot
Date: Sep 2, 2008 09:12
Hi,
I replace my PasswordPolicy.pm by the one you provided, but I get worse ;)
The control is not working, as shown byt the Dump of the LDAP bind object:
$VAR1 = bless( {
'parent' => bless( {
'net_ldap_version' => 3,
'net_ldap_scheme' => 'ldap',
...
|
Show full article (2.01Kb) |
2 Comments |
|
|
Author: coudotcoudot
Date: Sep 1, 2008 09:05
Hello,
I'm using the PP control to retrieve warning (time to expiration and authn
remaining). But it seems the dedicated functions time_before_expiration()
and grace_authentications_remaining() are not wroking.
I run this:
-----------------------
print "Time before expiration:".$resp->time_before_expiration."\n";
print "Time before
expiration:".$resp->{asn}->{warning}->{timeBeforeExpiration}."\n";
------------------------
And the result is:
------------------------
Time before expiration:
Time before expiration:1249
------------------------
So the control is well formed (I can check it with Data::Dumper), but I
can read the value only by browing the HASH and with the dedicated
function.
I use perl-ldap 0.36 on Linux CentOS 5.2.
|
Show full article (0.78Kb) |
1 Comment |
|
|
Author: Pierre AyottePierre Ayotte
Date: Aug 28, 2008 12:26
Hi,
We are currently using Perl::LDAP for many years now and it was working
really fine until a couple of days. We have 5 Windows 2000 active
directory wich we acess with Perl::LDAP using bind. Now in three of those
environnement we have the following error message when we try to bind to
the AD :
"LDAP_STRONG_AUTH_REQUIRED
The server requires authentication be performed with a SASL mechanism"
Here is the perl code:
use Net::LDAP;
use Net::LDAP::Util('ldap_error_name','ldap_error_text');
$ldap = Net::LDAP->new(@ARGV[0]) or die "$@";
$mesg = $ldap->bind( dn => "cn=XXXXX,ou=XXXXX,DC=XXX,DC=XXX,DC=XXX",
password => 'PWD', version => "3");
if ($mesg->code) {
$msg = ldap_error_name($mesg->code)."
\n".ldap_error_text($mesg->code)." ".$mesg->mesg_id;
print $msg;
}
|
Show full article (2.22Kb) |
1 Comment |
|
|
Author: Graham BarrGraham Barr
Date: Aug 28, 2008 06:07
perl-ldap-0.37 should appear on CPAN soon with the following changes
perl-ldap 0.37 -- Thu Aug 28 07:48:13 CDT 2008
==============================================
Bug Fixes
* Pass correct hostname to SASL when connecting to a round-robin
* Return the SASL error message when sasl client_start fails
Enhancements
* Add Modify Increment (RFC 4525) support
* Add Content Synchronization (RFC 4453) support
The repository is available at http://git.goingon.net/?p=perl-ldap.git;a=summary
log summary
===========
commit 0ad1afebd38acc8a0215e79773474b89ea7995a9
Author: Graham Barr pobox.com>
Date: Thu Aug 28 07:52:15 2008 -0500
Release 0.37
|
Show full article (4.17Kb) |
no comments
|
|
|
|
|
Author: Ocns PcnsOcns Pcns
Date: Aug 26, 2008 05:49
Please see the facts below -- Any ideas? Workarounds?
TIA,
GC
=================================================================
The Issue:
"" is not exported by the Net::LDAP::Constant module at select_bsid.pl line 32
at /usr/lib/perl5/site_perl/5.10/Net/LDAP/Constant.pm line 25
Net::LDAP::Constant::import(undef, undef) called at select_bsid.pl line 32
main::BEGIN() called at /usr/lib/perl5/site_perl/5.10/Net/LDAP.pm line 3 2
eval {...} called at /usr/lib/perl5/site_perl/5.10/Net/LDAP.pm line 32
Can't continue after import errors at select_bsid.pl line 32
The code excerpt:
use Net::LDAP;
The Environment:
--> cygwin 1.5.25-15
--> perl v5.10.0 built for cygwin-thread-multi-64int
--> perl-ldap 0.36 (all required an optional modules installed)
The perl-ldap compile,test & install session:
|
Show full article (2.96Kb) |
1 Comment |
|
|
|