Yes - I did try what you suggested. The error I got is that no attributes are available for updating. *grr!* There was some other thing I saw in Net::LDAP::Entry about using 'newrdn' attribute and changetype('moddn').. that didn't work either.
Here's what I did to create an LDIF:
open(FILE, ">$u.ldif");
Net::LDAP::LDIF->new(\*FILE, "w")->write($entry);
close FILE;
Here's the result:
dn: cn=6c2f995b-c1de-41ee-8b70-07f134dac04a,ou=Misc,<censored>
objectclass: person
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: CourierMailAccount
objectclass: CourierMailAlias
objectclass: posixAccount
objectclass: shadowAccount
sn: McRitchie
cn: T McRitchie
cn: 6c2f995b-c1de-41ee-8b70-07f134dac04a
givenname: T
mail: tmcritchie@<censored>
o: Misc
telephonenumber: unknown
title: unknown
roomnumber: unknown
homedirectory: /home/tmcritchie
userpassword: {MD5}<censored>
uidnumber: 20003
gidnumber: 20003
maildrop: tmcritchie
shadowlastchange: 99999
shadowmax: 99999
shadowwarning: 7
uid: tmcritchie
gecos: tmcritchie
loginshell: /bin/false
quota: 50
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.