Front page | perl.ldap |
Postings from February 2011
RE: Password modify
Thread Previous
|
Thread Next
From:
Threet, Robert A
Date:
February 21, 2011 00:38
Subject:
RE: Password modify
Message ID:
ED740C9476CEF7449C1E8C1419513DD00176C64F03@ExchMail.usi.edu
Yeah - adds work great! I didn't get how to modify the password. It looks like you have to read in the entire entry - modify - then re-add it. Noticed that thinking in the LDAP Admin Guide Friday night.
Robert Threet
Systems Manager
USI Computer Center
(812) 465-1070
Confidentiality Statement: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information.
________________________________________
From: Chris Ridd [chrisridd@mac.com]
Sent: Saturday, February 19, 2011 5:58 AM
To: Threet, Robert A
Cc: perl-ldap@perl.org
Subject: Re: Password modify
On 17 Feb 2011, at 17:10, Robert Threet wrote:
> I have a working Net::LDAP::Entry program for adding users so I decided
> to gut it to create a userPassword changer.
>
> I keep getting "Error changing password: no objectClass attribute".
>
> I cannot find examples doing simple one-at-a-time adds like this. All I
> can find are examples using arrays and hashes and cannot seem to
> translate it to this. Any tips?
There's a simple example right at the top of the Net::LDAP man page :-)
Or at <http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP.pod> if you prefer:
---
$result = $ldap->add( 'cn=Barbara Jensen, o=University of Michigan, c=US',
attr => [
'cn' => ['Barbara Jensen', 'Barbs Jensen'],
'sn' => 'Jensen',
'mail' => 'b.jensen@umich.edu',
'objectclass' => ['top', 'person',
'organizationalPerson',
'inetOrgPerson' ],
]
);
$result->code && warn "failed to add entry: ", $result->error ;
---
Chris
Thread Previous
|
Thread Next