You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(200) |
Jun
(129) |
Jul
(184) |
Aug
(204) |
Sep
(106) |
Oct
(79) |
Nov
(72) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(83) |
Feb
(123) |
Mar
(84) |
Apr
(184) |
May
(106) |
Jun
(111) |
Jul
(104) |
Aug
(91) |
Sep
(59) |
Oct
(99) |
Nov
(100) |
Dec
(37) |
2002 |
Jan
(148) |
Feb
(88) |
Mar
(85) |
Apr
(151) |
May
(80) |
Jun
(110) |
Jul
(85) |
Aug
(43) |
Sep
(64) |
Oct
(89) |
Nov
(59) |
Dec
(42) |
2003 |
Jan
(129) |
Feb
(104) |
Mar
(162) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ma...@mj...> - 2001-04-03 18:57:12
|
On 3 Apr 01, at 11:08, Ron Hall wrote: > > > > > > OK, then why would it fail to bind? > > Incorrect password. > > OK I'll but that but I changed the password for the > cn="Directory Manager" myself and it was correct. > Did you actually encode it with SHA-1 before putting it into the slapd.conf file? > > > > > > BTW do I need to escape ! character if it appears in the > > > plaintext password? > > No, you shouldn't. I haven't tried a ! in the password before but it > > should be allowed. > > OK I've tried both, but I'll go back to unescaped. > > > > > > > I do not have this problem with either my PMDF directory server > > > or OpenLDAP. > > > Are you sure they're all the same passwords? > > No they are different servers, my point was that I > have sucessfully written code that talks,walks and squawks > at OpenLDAP and PMDF. Just Netscape giving me a headache. Normally it's the other way around for me :). I've used Netscape since alpha-1 DS 1.0 and never had this type of problem. I think the password is encoded incorrectly. > > > > > > > > I don't own the LDAP server it is physically in another > > > building running on NT and the person who administers it > > > in technically not quite there yet, so he doesn't know where > > > everything is and the person who set it up is long gone. > > > that could be your problem :) > > Yah think?!? Phew I thought it was only me :) > > > > > > > So would there be something else blocking a bind as the > > > "Directory Manager" which IS defined as the rootdn in the > > > LDAP DB? > > > What's the error message being returned? If it's 49 then it's > > incorrect password, it could be that you've got the wrong DN for the > > Directory Manager (normally it's cn=Directory Manager). > > No rootdn is defined as cn=Drectory Manager. > > The error code is 48. Had to go look this up in the Netscape Java SDK. 48 is 48=Inappropriate authentication Can you send me or the list a copy of the code you're using. Also which version of the Netscape Directory server? Mark > > > r > > > > Mark Wilcox ma...@mj... Got LDAP? |
From: Dean B. <be...@ho...> - 2001-04-03 17:33:31
|
I don't know what kind of traffic the list gets ... but I thought I'd say hello since I'm new. I'm also a Perl newbie (around 6months) so I hope no one thinks I'm a stupid person qoth questions :) I've recently been dubbed the "LDAP Guru" at work and need a customized interface to OpenLDAP via perl-cgi and apache. Joy ! Dean _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com |
From: Ron H. <th...@cc...> - 2001-04-03 15:48:14
|
> > The error shows "Drectory Manager" perhaps you need to be using "Directory > Manager"? > > > > No rootdn is defined as cn=Drectory Manager. <Sigh> I obviously cannot tpye. r |
From: <ne...@na...> - 2001-04-03 15:23:22
|
The error shows "Drectory Manager" perhaps you need to be using "Directory Manager"? No rootdn is defined as cn=Drectory Manager. SteveN |
From: Ron H. <th...@cc...> - 2001-04-03 15:09:37
|
> > > > OK, then why would it fail to bind? > Incorrect password. OK I'll but that but I changed the password for the cn="Directory Manager" myself and it was correct. > > > > BTW do I need to escape ! character if it appears in the > > plaintext password? > No, you shouldn't. I haven't tried a ! in the password before but it > should be allowed. OK I've tried both, but I'll go back to unescaped. > > > > I do not have this problem with either my PMDF directory server > > or OpenLDAP. > Are you sure they're all the same passwords? No they are different servers, my point was that I have sucessfully written code that talks,walks and squawks at OpenLDAP and PMDF. Just Netscape giving me a headache. > > > > > I don't own the LDAP server it is physically in another > > building running on NT and the person who administers it > > in technically not quite there yet, so he doesn't know where > > everything is and the person who set it up is long gone. > that could be your problem :) Yah think?!? Phew I thought it was only me :) > > > > So would there be something else blocking a bind as the > > "Directory Manager" which IS defined as the rootdn in the > > LDAP DB? > What's the error message being returned? If it's 49 then it's > incorrect password, it could be that you've got the wrong DN for the > Directory Manager (normally it's cn=Directory Manager). No rootdn is defined as cn=Drectory Manager. The error code is 48. r |
From: <ma...@mj...> - 2001-04-03 14:45:31
|
On 3 Apr 01, at 7:58, Ron Hall wrote: > On Mon, 2 Apr 2001 ma...@mj... wrote: > > > How the password is stored on the LDAP server is inconsiquential > > when using simple bind. > > > > you pass the DN and plain text password regardless: > > > > $ldap->bind($dn,password => "mypassword"); > > > OK, then why would it fail to bind? Incorrect password. > > BTW do I need to escape ! character if it appears in the > plaintext password? No, you shouldn't. I haven't tried a ! in the password before but it should be allowed. > > I do not have this problem with either my PMDF directory server > or OpenLDAP. Are you sure they're all the same passwords? > > I don't own the LDAP server it is physically in another > building running on NT and the person who administers it > in technically not quite there yet, so he doesn't know where > everything is and the person who set it up is long gone. that could be your problem :) > > So would there be something else blocking a bind as the > "Directory Manager" which IS defined as the rootdn in the > LDAP DB? What's the error message being returned? If it's 49 then it's incorrect password, it could be that you've got the wrong DN for the Directory Manager (normally it's cn=Directory Manager). Mark > > > Mark Wilcox ma...@mj... Got LDAP? |
From: Ron H. <th...@cc...> - 2001-04-03 11:59:38
|
On Mon, 2 Apr 2001 ma...@mj... wrote: > How the password is stored on the LDAP server is inconsiquential > when using simple bind. > > you pass the DN and plain text password regardless: > > $ldap->bind($dn,password => "mypassword"); OK, then why would it fail to bind? BTW do I need to escape ! character if it appears in the plaintext password? I do not have this problem with either my PMDF directory server or OpenLDAP. I don't own the LDAP server it is physically in another building running on NT and the person who administers it in technically not quite there yet, so he doesn't know where everything is and the person who set it up is long gone. So would there be something else blocking a bind as the "Directory Manager" which IS defined as the rootdn in the LDAP DB? |
From: David R. <d.r...@qu...> - 2001-04-03 01:31:39
|
Thankyou, it seems some slight and I mean very slight modification has this working now. Thank you to all those that helped me out here. Dave. ma...@mj... wrote: > > The best of all possible worlds would be to use a Virtual List View > control. > > However, if you're LDAP server doesn't support the VLV (I haven't > played much with Net::LDAP VLV control to verify it working in all > instances), the only option you have is to search as the directory > super user (which it sounds like you are). > > The trick would probably be to use the callback option: > > $ldap->search( > ... > callback => \&callback) > > sub callback { > my ($msg,$entry) = @_; > > if ($entry ref 'Net::LDAP::Entry') > { > #do something > $mesg->shift_entry(); #remove from memory > } > } > > should be able to process each entry as its recieved and not run > out of memory :). > > Mark > On 3 Apr 01, at 9:05, David Richards wrote: > > > OK: > > > > perl -v produces: > > This is perl, version 5.005_03 built for alpha-dec_osf > > > > uname -a prduces: > > OSF1 tu01m2.qut.edu.au V5.1 732 alpha > > > > and perl-ldap is: > > perl-ldap-0.22 > > > > I am attempting to retrieve about 120 000 entries, retrieving 5 > > attributes, which are (just for an idea of size): > > > > uid : typically 8 characters > > mailUID : typically 89 characters > > QUTmailbox : flag 'yes' or 'no' > > mailboxQuota : Integer, most cases is 10000 > > cn : Normal common names. > > > > The script is an account maintenance script for our central mail > > system, to manage the active IMAP accounts, just for a bit of context. > > > > Thanks, > > > > Clif Harden wrote: > > > > > > > > > > > Graham, > > > > > > > > Can you help me out here. I am trying to retrieve a lot of > > > > entries that causes the Perl-LDAP library to produce 'Out of > > > > memory!' and fall over. What is the best way to retrieve the > > > > entries? Have you got some sample code? > > > > > > A little more information may help. > > > > > > What version of perl, perl-ldap, system OS. > > > > > > How many entries are you trying to get: 1000, 10000, 100000. > > > > > > Regards, > > > > > > Clif > > > > > > > > > > > Thanks, > > > > > > > > Dave. > > > > > > > > > > > > Graham Barr wrote: > > > > > > > > > > On Thu, Mar 29, 2001 at 09:07:37AM +1000, David Richards wrote: > > > > > > printf( "Searching...\n" ); > > > > > > $count = 0; > > > > > > $res = $ldap->search( base => $LDAP_BASE, filter => > > > > > > "(objectclass=QUTmailPerson)", > > > > > > attrs => ['uid', 'mailUID', > > > > > > 'QUTmailbox', > > > > > > 'mailboxQuota', 'cn' ], > > > > > > callback => &LDAP_callback() ); > > > > > > > > > > That needs to be \&LDAP_callback > > > > > > > > > > In its current form you are calling the function and passing its > > > > > results to ->search() which is NOT what you want. > > > > > > > > > > Graham. > > > > > > > > -- > > > > David Richards > > > > Project Manager (Messaging) > > > > Information Technology Services > > > > Queensland University of Technology > > > > > > > > > > > > -- > > David Richards > > Project Manager (Messaging) > > Information Technology Services > > Queensland University of Technology > > > > > > > > Mark Wilcox > ma...@mj... > Got LDAP? -- David Richards Project Manager (Messaging) Information Technology Services Queensland University of Technology |
From: <ma...@mj...> - 2001-04-02 23:27:53
|
The best of all possible worlds would be to use a Virtual List View control. However, if you're LDAP server doesn't support the VLV (I haven't played much with Net::LDAP VLV control to verify it working in all instances), the only option you have is to search as the directory super user (which it sounds like you are). The trick would probably be to use the callback option: $ldap->search( ... callback => \&callback) sub callback { my ($msg,$entry) = @_; if ($entry ref 'Net::LDAP::Entry') { #do something $mesg->shift_entry(); #remove from memory } } should be able to process each entry as its recieved and not run out of memory :). Mark On 3 Apr 01, at 9:05, David Richards wrote: > OK: > > perl -v produces: > This is perl, version 5.005_03 built for alpha-dec_osf > > uname -a prduces: > OSF1 tu01m2.qut.edu.au V5.1 732 alpha > > and perl-ldap is: > perl-ldap-0.22 > > I am attempting to retrieve about 120 000 entries, retrieving 5 > attributes, which are (just for an idea of size): > > uid : typically 8 characters > mailUID : typically 89 characters > QUTmailbox : flag 'yes' or 'no' > mailboxQuota : Integer, most cases is 10000 > cn : Normal common names. > > The script is an account maintenance script for our central mail > system, to manage the active IMAP accounts, just for a bit of context. > > Thanks, > > Clif Harden wrote: > > > > > > > > Graham, > > > > > > Can you help me out here. I am trying to retrieve a lot of > > > entries that causes the Perl-LDAP library to produce 'Out of > > > memory!' and fall over. What is the best way to retrieve the > > > entries? Have you got some sample code? > > > > A little more information may help. > > > > What version of perl, perl-ldap, system OS. > > > > How many entries are you trying to get: 1000, 10000, 100000. > > > > Regards, > > > > Clif > > > > > > > > Thanks, > > > > > > Dave. > > > > > > > > > Graham Barr wrote: > > > > > > > > On Thu, Mar 29, 2001 at 09:07:37AM +1000, David Richards wrote: > > > > > printf( "Searching...\n" ); > > > > > $count = 0; > > > > > $res = $ldap->search( base => $LDAP_BASE, filter => > > > > > "(objectclass=QUTmailPerson)", > > > > > attrs => ['uid', 'mailUID', > > > > > 'QUTmailbox', > > > > > 'mailboxQuota', 'cn' ], > > > > > callback => &LDAP_callback() ); > > > > > > > > That needs to be \&LDAP_callback > > > > > > > > In its current form you are calling the function and passing its > > > > results to ->search() which is NOT what you want. > > > > > > > > Graham. > > > > > > -- > > > David Richards > > > Project Manager (Messaging) > > > Information Technology Services > > > Queensland University of Technology > > > > > > > > -- > David Richards > Project Manager (Messaging) > Information Technology Services > Queensland University of Technology > > > Mark Wilcox ma...@mj... Got LDAP? |
From: <ma...@mj...> - 2001-04-02 23:23:39
|
How the password is stored on the LDAP server is inconsiquential when using simple bind. you pass the DN and plain text password regardless: $ldap->bind($dn,password => "mypassword"); Mark On 2 Apr 01, at 21:29, Graham Barr wrote: > ----- Forwarded message from Ron Hall <th...@cc...> ----- > > Date: Fri, 30 Mar 2001 12:59:34 -0500 (EST) > To: gb...@po... > From: Ron Hall <th...@cc...> > Subject: Net::LDAP api talking to Netscape Directory server > > > Howdy! > > How would one bind to a Netscape Directory server using > Net::LDAP, when the passwd is SHA encrypted on the Netscape > side of things? > > r > > > > ----- End forwarded message ----- > > > Mark Wilcox ma...@mj... Got LDAP? |
From: David R. <d.r...@qu...> - 2001-04-02 23:06:11
|
OK: perl -v produces: This is perl, version 5.005_03 built for alpha-dec_osf uname -a prduces: OSF1 tu01m2.qut.edu.au V5.1 732 alpha and perl-ldap is: perl-ldap-0.22 I am attempting to retrieve about 120 000 entries, retrieving 5 attributes, which are (just for an idea of size): uid : typically 8 characters mailUID : typically 89 characters QUTmailbox : flag 'yes' or 'no' mailboxQuota : Integer, most cases is 10000 cn : Normal common names. The script is an account maintenance script for our central mail system, to manage the active IMAP accounts, just for a bit of context. Thanks, Clif Harden wrote: > > > > > Graham, > > > > Can you help me out here. I am trying to retrieve a lot of entries that > > causes the Perl-LDAP library to produce 'Out of memory!' and fall over. > > What is the best way to retrieve the entries? Have you got some sample > > code? > > A little more information may help. > > What version of perl, perl-ldap, system OS. > > How many entries are you trying to get: 1000, 10000, 100000. > > Regards, > > Clif > > > > > Thanks, > > > > Dave. > > > > > > Graham Barr wrote: > > > > > > On Thu, Mar 29, 2001 at 09:07:37AM +1000, David Richards wrote: > > > > printf( "Searching...\n" ); > > > > $count = 0; > > > > $res = $ldap->search( base => $LDAP_BASE, filter => > > > > "(objectclass=QUTmailPerson)", > > > > attrs => ['uid', 'mailUID', 'QUTmailbox', > > > > 'mailboxQuota', 'cn' ], > > > > callback => &LDAP_callback() ); > > > > > > That needs to be \&LDAP_callback > > > > > > In its current form you are calling the function and passing its results > > > to ->search() which is NOT what you want. > > > > > > Graham. > > > > -- > > David Richards > > Project Manager (Messaging) > > Information Technology Services > > Queensland University of Technology > > > > -- David Richards Project Manager (Messaging) Information Technology Services Queensland University of Technology |
From: Eric N. <eni...@cp...> - 2001-04-02 20:53:08
|
I wrote a pretty cool recursive LDAP tree search and mid way through the tree I got an LDAP_OPERATIONS_ERROR and every consecutive search got me an LDAP_LOCAL_ERROR. Can anyone give me some insight into these messages? |
From: Graham B. <gb...@po...> - 2001-04-02 20:30:05
|
----- Forwarded message from Ron Hall <th...@cc...> ----- Date: Fri, 30 Mar 2001 12:59:34 -0500 (EST) To: gb...@po... From: Ron Hall <th...@cc...> Subject: Net::LDAP api talking to Netscape Directory server Howdy! How would one bind to a Netscape Directory server using Net::LDAP, when the passwd is SHA encrypted on the Netscape side of things? r ----- End forwarded message ----- |
From: Edgington, J. <je...@um...> - 2001-04-02 20:12:01
|
Ok.. that produced the following error... pulsar(18)>perl password.pl failed: 53 00002077: SvcErr: DSID-031D0A84, problem 5003 (WILL_NOT_PERFORM), data 0 at password.pl line 38. -----Original Message----- From: Graham Barr [mailto:gb...@po...] Sent: Monday, April 02, 2001 3:08 PM To: Edgington, Jeffrey Cc: per...@li... Subject: Re: Changing password via Net::LDAPS and Perl Well first off you cannot call a mthod from inside a string. Change the last line to $mesg->code && die "failed: ", $mesg->code," ",$mesg->error; may be more helpful. Graham. On Mon, Apr 02, 2001 at 02:59:35PM -0500, Edgington, Jeffrey wrote: > Good point :) > > This is the error I am getting back. > > failed: Net::LDAP::Modify=HASH(0x8490370)->error at password.pl line 38. > > > > > -----Original Message----- > From: Graham Barr [mailto:gb...@po...] > Sent: Monday, April 02, 2001 2:58 PM > To: Edgington, Jeffrey > Cc: per...@li... > Subject: Re: Changing password via Net::LDAPS and Perl > > > It would probably help others help you if you could tell us how > it is failing to do what you expect. > > Graham. > > On Mon, Apr 02, 2001 at 02:48:14PM -0500, Edgington, Jeffrey wrote: > > Ok... I'm hoping someone has already done this and can tell me what I have > > wrong... I want to reset passwords via Net::LDAPS (LDAP over SSL) but > having > > little luck with it. > > > > Below is the code as it stands now.... thanks for any help you can give > me. > > > > > > #!/umr/testbin/perl > > > > $| =1; > > > > use Convert::BER; > > use Net::LDAPS; > > > > $ldaps = new Net::LDAPS('srvtst01.cc.umr.edu', > > port=> '636'); > > > > > > $UserPass="94ranger"; > > $UserID="Administrator"; > > $ADSserver='srvtst01.cc.umr.edu'; > > $DomainDN=" dc=test, dc=umr, dc=edu"; > > $UserDN="cn=$UserID, cn=users, " . $DomainDN; > > > > $ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@"; > > > > $mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" ); > > $mesg->code && die "bind failed: $mesg->error"; > > > > $tempDN = "cn=Test2 Edg, cn=Users, " . $DomainDN; > > > > > > $pwd = new Convert::BER; > > > > $pwd->encode( > > STRING=>"hello", > > ) or die; > > > > $mesg = $ldaps->modify(dn => $tempDN, > > changes => [ > > replace => [ unicodePwd => "$pwd"] > > ] > > ); > > > > $mesg->code && die "failed: $mesg->error"; > > > > > > > > > > > > > > > > > > > |
From: Graham B. <gb...@po...> - 2001-04-02 20:08:38
|
Well first off you cannot call a mthod from inside a string. Change the last line to $mesg->code && die "failed: ", $mesg->code," ",$mesg->error; may be more helpful. Graham. On Mon, Apr 02, 2001 at 02:59:35PM -0500, Edgington, Jeffrey wrote: > Good point :) > > This is the error I am getting back. > > failed: Net::LDAP::Modify=HASH(0x8490370)->error at password.pl line 38. > > > > > -----Original Message----- > From: Graham Barr [mailto:gb...@po...] > Sent: Monday, April 02, 2001 2:58 PM > To: Edgington, Jeffrey > Cc: per...@li... > Subject: Re: Changing password via Net::LDAPS and Perl > > > It would probably help others help you if you could tell us how > it is failing to do what you expect. > > Graham. > > On Mon, Apr 02, 2001 at 02:48:14PM -0500, Edgington, Jeffrey wrote: > > Ok... I'm hoping someone has already done this and can tell me what I have > > wrong... I want to reset passwords via Net::LDAPS (LDAP over SSL) but > having > > little luck with it. > > > > Below is the code as it stands now.... thanks for any help you can give > me. > > > > > > #!/umr/testbin/perl > > > > $| =1; > > > > use Convert::BER; > > use Net::LDAPS; > > > > $ldaps = new Net::LDAPS('srvtst01.cc.umr.edu', > > port=> '636'); > > > > > > $UserPass="94ranger"; > > $UserID="Administrator"; > > $ADSserver='srvtst01.cc.umr.edu'; > > $DomainDN=" dc=test, dc=umr, dc=edu"; > > $UserDN="cn=$UserID, cn=users, " . $DomainDN; > > > > $ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@"; > > > > $mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" ); > > $mesg->code && die "bind failed: $mesg->error"; > > > > $tempDN = "cn=Test2 Edg, cn=Users, " . $DomainDN; > > > > > > $pwd = new Convert::BER; > > > > $pwd->encode( > > STRING=>"hello", > > ) or die; > > > > $mesg = $ldaps->modify(dn => $tempDN, > > changes => [ > > replace => [ unicodePwd => "$pwd"] > > ] > > ); > > > > $mesg->code && die "failed: $mesg->error"; > > > > > > > > > > > > > > > > > > > |
From: Edgington, J. <je...@um...> - 2001-04-02 19:59:39
|
Good point :) This is the error I am getting back. failed: Net::LDAP::Modify=HASH(0x8490370)->error at password.pl line 38. -----Original Message----- From: Graham Barr [mailto:gb...@po...] Sent: Monday, April 02, 2001 2:58 PM To: Edgington, Jeffrey Cc: per...@li... Subject: Re: Changing password via Net::LDAPS and Perl It would probably help others help you if you could tell us how it is failing to do what you expect. Graham. On Mon, Apr 02, 2001 at 02:48:14PM -0500, Edgington, Jeffrey wrote: > Ok... I'm hoping someone has already done this and can tell me what I have > wrong... I want to reset passwords via Net::LDAPS (LDAP over SSL) but having > little luck with it. > > Below is the code as it stands now.... thanks for any help you can give me. > > > #!/umr/testbin/perl > > $| =1; > > use Convert::BER; > use Net::LDAPS; > > $ldaps = new Net::LDAPS('srvtst01.cc.umr.edu', > port=> '636'); > > > $UserPass="94ranger"; > $UserID="Administrator"; > $ADSserver='srvtst01.cc.umr.edu'; > $DomainDN=" dc=test, dc=umr, dc=edu"; > $UserDN="cn=$UserID, cn=users, " . $DomainDN; > > $ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@"; > > $mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" ); > $mesg->code && die "bind failed: $mesg->error"; > > $tempDN = "cn=Test2 Edg, cn=Users, " . $DomainDN; > > > $pwd = new Convert::BER; > > $pwd->encode( > STRING=>"hello", > ) or die; > > $mesg = $ldaps->modify(dn => $tempDN, > changes => [ > replace => [ unicodePwd => "$pwd"] > ] > ); > > $mesg->code && die "failed: $mesg->error"; > > > > > > > > > |
From: Graham B. <gb...@po...> - 2001-04-02 19:59:02
|
On Mon, Apr 02, 2001 at 03:50:23PM -0400, Eric Nichols wrote: > I've got another tough question. > Is there a way for perl-ldap to automatically re-bind in case of a lost > connection? No, because Net::LDAP does not store any of the information that is passed to bind. Graham. |
From: Graham B. <gb...@po...> - 2001-04-02 19:58:23
|
It would probably help others help you if you could tell us how it is failing to do what you expect. Graham. On Mon, Apr 02, 2001 at 02:48:14PM -0500, Edgington, Jeffrey wrote: > Ok... I'm hoping someone has already done this and can tell me what I have > wrong... I want to reset passwords via Net::LDAPS (LDAP over SSL) but having > little luck with it. > > Below is the code as it stands now.... thanks for any help you can give me. > > > #!/umr/testbin/perl > > $| =1; > > use Convert::BER; > use Net::LDAPS; > > $ldaps = new Net::LDAPS('srvtst01.cc.umr.edu', > port=> '636'); > > > $UserPass="94ranger"; > $UserID="Administrator"; > $ADSserver='srvtst01.cc.umr.edu'; > $DomainDN=" dc=test, dc=umr, dc=edu"; > $UserDN="cn=$UserID, cn=users, " . $DomainDN; > > $ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@"; > > $mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" ); > $mesg->code && die "bind failed: $mesg->error"; > > $tempDN = "cn=Test2 Edg, cn=Users, " . $DomainDN; > > > $pwd = new Convert::BER; > > $pwd->encode( > STRING=>"hello", > ) or die; > > $mesg = $ldaps->modify(dn => $tempDN, > changes => [ > replace => [ unicodePwd => "$pwd"] > ] > ); > > $mesg->code && die "failed: $mesg->error"; > > > > > > > > > |
From: Eric N. <eni...@cp...> - 2001-04-02 19:51:26
|
I've got another tough question. Is there a way for perl-ldap to automatically re-bind in case of a lost connection? |
From: Edgington, J. <je...@um...> - 2001-04-02 19:48:22
|
Ok... I'm hoping someone has already done this and can tell me what I have wrong... I want to reset passwords via Net::LDAPS (LDAP over SSL) but having little luck with it. Below is the code as it stands now.... thanks for any help you can give me. #!/umr/testbin/perl $| =1; use Convert::BER; use Net::LDAPS; $ldaps = new Net::LDAPS('srvtst01.cc.umr.edu', port=> '636'); $UserPass="94ranger"; $UserID="Administrator"; $ADSserver='srvtst01.cc.umr.edu'; $DomainDN=" dc=test, dc=umr, dc=edu"; $UserDN="cn=$UserID, cn=users, " . $DomainDN; $ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@"; $mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" ); $mesg->code && die "bind failed: $mesg->error"; $tempDN = "cn=Test2 Edg, cn=Users, " . $DomainDN; $pwd = new Convert::BER; $pwd->encode( STRING=>"hello", ) or die; $mesg = $ldaps->modify(dn => $tempDN, changes => [ replace => [ unicodePwd => "$pwd"] ] ); $mesg->code && die "failed: $mesg->error"; |
From: Eric N. <eni...@cp...> - 2001-04-02 15:40:51
|
Thanks for all the help! I've never seen responses so quick! I did figure out one snipit of code, this just writes it to STDOUT. Actually any existing file handle can be used. my $ldif = Net::LDAP::LDIF->new(\*STDOUT,"a"); $ldif->write_cmd($destentry); $ldif->done(); This sounds obvious to the experienced, but to us lay people.... ----- Original Message ----- From: "Eryq" <er...@ze...> To: "Graham Barr" <gb...@po...> Cc: "Eric Nichols" <eni...@cp...>; <per...@li...> Sent: Monday, April 02, 2001 11:22 AM Subject: Re: Writing an LDIF to a variable? > Graham Barr wrote: > > > > That is an easy fix to IO::Scalar though > > > > sub TELL { shift->{Pos} } > > > > Graham. > > > > Consider it on the queue. I should get to it tonight; > somebody please bug me if they don't see it on CPAN > soon. > > Eryq > > |
From: Eryq <er...@ze...> - 2001-04-02 15:22:41
|
Graham Barr wrote: > > That is an easy fix to IO::Scalar though > > sub TELL { shift->{Pos} } > > Graham. > Consider it on the queue. I should get to it tonight; somebody please bug me if they don't see it on CPAN soon. Eryq |
From: Graham B. <gb...@po...> - 2001-04-02 14:15:41
|
That is an easy fix to IO::Scalar though sub TELL { shift->{Pos} } Graham. On Fri, Mar 30, 2001 at 02:34:40PM -0500, Eric Nichols wrote: > No such luck, > I got it to work, except IO::Scalar dosen't support the TELL function? > > Can't locate object method "TELL" via package "IO::Scalar" at > C:/Perl/site/lib/Net/LDAP/LDIF.pm line 169. > > Source code: > --- > use Net::LDAP::Entry; > use Net::LDAP::LDIF; > use IO::Scalar; > > my ($destentry) = Net::LDAP::Entry->new; > $destentry->add('cn'=>['Eric Nichols']); > $destentry->dn('cn=eric nichols,o=cps'); > > my $s; > tie *OUT, 'IO::Scalar', \$s; > > my $ldif = Net::LDAP::LDIF->new(\*OUT,"a"); > $ldif->write($destentry); > $ldif->done(); > > print $s; > --- > ----- Original Message ----- > From: "Graham Barr" <gb...@po...> > To: "Eric Nichols" <eni...@cp...> > Cc: <per...@li...> > Sent: Friday, March 30, 2001 11:00 AM > Subject: Re: Writing an LDIF to a variable? > > > > It should be possible using the IO::Scalar package. > > > > Create the IO::Scalar object then > > > > my $ldif = Net::LDAP::LDIF->new($io_scalar,"w"); > > $ldif->write(@entries); > > > > should work, but I have not tried it > > > > Graham. > > > > On Fri, Mar 30, 2001 at 10:54:06AM -0500, Eric Nichols wrote: > > > This might have been asked before. > > > Is there any way I can take an Net::LDAP::Entry object and save it in > LDIF > > > format to a variable rather than a file? > > > > > > I'm sure there's some perl trick to it.. > > > > > > > > > > > > > > > > > > |
From: Clif H. <cl...@di...> - 2001-04-02 12:41:03
|
> > Graham, > > Can you help me out here. I am trying to retrieve a lot of entries that > causes the Perl-LDAP library to produce 'Out of memory!' and fall over. > What is the best way to retrieve the entries? Have you got some sample > code? A little more information may help. What version of perl, perl-ldap, system OS. How many entries are you trying to get: 1000, 10000, 100000. Regards, Clif > > Thanks, > > Dave. > > > Graham Barr wrote: > > > > On Thu, Mar 29, 2001 at 09:07:37AM +1000, David Richards wrote: > > > printf( "Searching...\n" ); > > > $count = 0; > > > $res = $ldap->search( base => $LDAP_BASE, filter => > > > "(objectclass=QUTmailPerson)", > > > attrs => ['uid', 'mailUID', 'QUTmailbox', > > > 'mailboxQuota', 'cn' ], > > > callback => &LDAP_callback() ); > > > > That needs to be \&LDAP_callback > > > > In its current form you are calling the function and passing its results > > to ->search() which is NOT what you want. > > > > Graham. > > -- > David Richards > Project Manager (Messaging) > Information Technology Services > Queensland University of Technology > > |
From: David R. <d.r...@qu...> - 2001-04-02 01:14:32
|
Graham, Can you help me out here. I am trying to retrieve a lot of entries that causes the Perl-LDAP library to produce 'Out of memory!' and fall over. What is the best way to retrieve the entries? Have you got some sample code? Thanks, Dave. Graham Barr wrote: > > On Thu, Mar 29, 2001 at 09:07:37AM +1000, David Richards wrote: > > printf( "Searching...\n" ); > > $count = 0; > > $res = $ldap->search( base => $LDAP_BASE, filter => > > "(objectclass=QUTmailPerson)", > > attrs => ['uid', 'mailUID', 'QUTmailbox', > > 'mailboxQuota', 'cn' ], > > callback => &LDAP_callback() ); > > That needs to be \&LDAP_callback > > In its current form you are calling the function and passing its results > to ->search() which is NOT what you want. > > Graham. -- David Richards Project Manager (Messaging) Information Technology Services Queensland University of Technology |