Chris Ridd wrote:
On 24/3/06 10:56, Quanah Gibson-Mount <[EMAIL PROTECTED]> wrote:


--On Friday, March 24, 2006 8:59 AM -0600 Jim Summers
<[EMAIL PROTECTED]> wrote:

Hello List,

I am re-writing some old scripts to take advantage of perl-ldap.   I was
working with a script to modify info and it seemed to be working fine.

I wanted to modify the value of the "loginShell" attribute for an
account.  It works perfectly for one entry.  Then I tested on a second
entry and it fails with the following:

LDAPERROR:89
LDAP_PARAM_ERROR
An invalid parameter was specified


Any ideas or suggestions?
Does your server have the sambasamaccount objectclass loaded?

Yes.  I just added it to the DN that I can modify and it still is ok.


That's a possible problem, however I think LDAP_PARAM_ERROR can only be
generated locally by Net::LDAP so the problem's likely in the script.

Typical reasons are:

* attempting to use a control or start_tls with LDAPv2

* passing in a bad filter string

* failing to pass a DN to add/modify/moddn/compare/delete

This turned out to be the problem. The DN that was failing has an ou of "ou=people" and the working DN has "ou=People". The script had a sanity check that tested for "People" but did not handle the problem of not getting the People, when it arose. Made the check case insensitive and all is well.

Now I will need to figure out how to fix the DN's that have a lowercase people.

Many Thanks for all of the responses. Actually pesticides in this case since it was a bug in my script!

Thanks again.


* passing an unknown change type to modify

* failing to pass a new RDN to moddn

And possibly other ones I've missed!

Extra information will be in the returned $mesg object.

Cheers,

Chris

--
Jim Summers
School of Computer Science-University of Oklahoma
-------------------------------------------------

Reply via email to