LDAP URLs
I plan to use a 'memberurl' or 'membershipFilter' attribute to store a search that generates a list of uids. A perl script would then build an aliases file from these. Is there a fancy method that accepts LDAP URLs? dn: cn: sales-ne,ou=Departments,o=ACME,c=US objectClass: top objectClass: posixGroup objectClass: inetMailGroup cn: sales-ne mail: [EMAIL PROTECTED] inetMailGroupVersion: 1 membershipFilter: ldap:///ou=People,o=ACME,c=US?uid?one?(&(objectclass=Person)(gidNumber=735))
Fwd: LDAP question
Begin forwarded message: From: "Ajay Lulia" <[EMAIL PROTECTED]> Date: 23 September 2003 5:54:19 BST To: <[EMAIL PROTECTED]> Subject: LDAP question Hello, I am using Net::LDAP to connect my GroupWise Address Book and getting data from the Address Book. This module is really good and help me a lot in getting user email ids. I am small question: I could figure it out what does cn and sn means and search for first name and last name. Is there a way to search for user defined fields in LDAP server? Like User Id, EmployeeID. Could you please let me know any site where I can find description for Filter parameter. for eg: sn means lastname, cn means name. Thankyou in advance for your help. Regards, Ajay Lulia
Re: Strange error from Net::LDAP::Message... bug?
This seems to be a line that was missed when the memory leak patch was applied. Change line 253 in Net::LDAP::Entry from $mesg = Net::LDAP::Message->new( {} ); to $mesg = Net::LDAP::Message->new( $ldap ); should fix it. Just tried it: Message stopped crying, but no useful action takes place on the directory server: when I call $e->update($ldap) I just see the bind requests on slapd's log, and nothing more :-( Well you would not. The part of the code in Entry that was causing this problem was code returning an error that there was nothing to update. Mh... sorry, maybe it's a language problem but I can't understand... Please, bear with me :-( This is how things go at the moment: * I open an authenticated connection to the directory server; I see the BIND request in the logs; * I retrieve $e from the d.s., see the SEARCH request; * I disconnect and see the connection closed[1] * I modify an attribute in $e locally * I bind again and see the BIND in the logs * this snippet runs: $e->changetype('modify') ; $msg = $e->update($ldap) ; if ($msg->is_error) { ... } but NOTHING HAPPENS! * I disconnect again and see the connection closed What's wrong with that? Where an I doing wrong? Sorry again for bothering you :-\ Ciao Marco ___ [1] it's a CGI script, so the connection is closed and reopened at each iteration -- Marco MarongiuEmail: [EMAIL PROTECTED] System Administrator Phone: +39 070 460 1684 Tiscali S.p.A.
Re: Strange error from Net::LDAP::Message... bug?
On 23 Sep 2003, at 9:18, Marco Marongiu wrote: This seems to be a line that was missed when the memory leak patch was applied. Change line 253 in Net::LDAP::Entry from $mesg = Net::LDAP::Message->new( {} ); to $mesg = Net::LDAP::Message->new( $ldap ); should fix it. Just tried it: Message stopped crying, but no useful action takes place on the directory server: when I call $e->update($ldap) I just see the bind requests on slapd's log, and nothing more :-( Well you would not. The part of the code in Entry that was causing this problem was code returning an error that there was nothing to update. Mh... sorry, maybe it's a language problem but I can't understand... Please, bear with me :-( This is how things go at the moment: * I open an authenticated connection to the directory server; I see the BIND request in the logs; * I retrieve $e from the d.s., see the SEARCH request; * I disconnect and see the connection closed[1] * I modify an attribute in $e locally * I bind again and see the BIND in the logs * this snippet runs: $e->changetype('modify') ; $msg = $e->update($ldap) ; But you have made no changes. if ($msg->is_error) { ... } but NOTHING HAPPENS! Odd is_error should have returned true and $msg->server_error should return "No attributes to update" Thats why you were seeing the error before. It was the code which is generating this error response that was causing the problem. Graham. * I disconnect again and see the connection closed What's wrong with that? Where an I doing wrong? Sorry again for bothering you :-\ Ciao Marco ___ [1] it's a CGI script, so the connection is closed and reopened at each iteration -- Marco MarongiuEmail: [EMAIL PROTECTED] System Administrator Phone: +39 070 460 1684 Tiscali S.p.A.