FW: Suggestions for perl examples
[email protected] (Steven M Chegash) Tue, 31 Jan 2017 16:19:38 +0000
| Newsgroups | perl.ldap |
|---|---|
| Message-ID | <BY1PR03MB14654EB65A5172DA3F3975B4804A0@BY1PR03MB1465.namprd03.prod.outlook.com> |
--_000_BY1PR03MB14654EB65A5172DA3F3975B4804A0BY1PR03MB1465namp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hello all,
One thing I can't seem to find are examples to do either of the following:
1. Delete an objectclass and it's required attributes
2. Replace an objectclass
What I really need to accomplish is update all the entries in my directory,=
deleting two custom objectclasses and attributes and replacing them with o=
ne single, simpler objectclass
When I've tried to modify an entry and delete the attributes and objectclas=
s, it complains that my objectclass is not an 'attribute'
mesg =3D Net::LDAP=3DHASH(0x1a1c00d0)->modify("uid=3Dtestcust34,ou=3DCSOPor=
tal,ou=3DExternal Users,ou=3DPeople,o=3Dmycompany.com", changes =3D> [ dele=
te =3D> 'myCrmId' ] , delete=3D>[ 'objectclass'=3D>'myPortaleProfile' ] )=
;
error_text:The request referenced an attribute that does not exist
error_code:16
server_error:GLPRDB050E Attribute myPortaleProfile was not found in the sch=
ema definition.
error:GLPRDB050E Attribute myPortaleProfile was not found in the schema def=
inition.
Exiting.
Any help you can provide is appreciated.
[email protected]<mailto:[email protected]>
--_000_BY1PR03MB14654EB65A5172DA3F3975B4804A0BY1PR03MB1465namp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:361786541;
mso-list-type:hybrid;
mso-list-template-ids:243013532 67698703 67698713 67698715 67698703 676987=
13 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Hello all,<o:p></o:=
p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">One thing I canR=
17;t seem to find are examples to do either of the following:<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoListParagraph" style=3D"text-indent:-.25in;mso-list:l0 level=
1 lfo2"><![if !supportLists]><span style=3D"font-size:12.0pt"><span style=
=3D"mso-list:Ignore">1.<span style=3D"font:7.0pt "Times New Roman"=
;">
</span></span></span><![endif]><span style=3D"font-size:12.0pt">Delete an o=
bjectclass and it’s required attributes<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoListParagraph" style=3D"text-indent:-.25in;mso-list:l0 level=
1 lfo2"><![if !supportLists]><span style=3D"font-size:12.0pt"><span style=
=3D"mso-list:Ignore">2.<span style=3D"font:7.0pt "Times New Roman"=
;">
</span></span></span><![endif]><span style=3D"font-size:12.0pt">Replace an =
objectclass<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">What I really need =
to accomplish is update all the entries in my directory, deleting two custo=
m objectclasses and attributes and replacing them with one single, simpler =
objectclass<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">When I’ve tri=
ed to modify an entry and delete the attributes and objectclass, it complai=
ns that my objectclass is not an
<span style=3D"color:#1F497D">‘</span>attribute<span style=3D"color:#=
1F497D">’</span><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">mesg =3D Net::LDAP=
=3DHASH(0x1a1c00d0)->modify("uid=3Dtestcust34,ou=3DCSOPortal,ou=3DE=
xternal Users,ou=3DPeople,o=3Dmycompany.com", changes =3D> [ delete=
=3D> 'myCrmId' ] , delete=3D>[ 'objectclass'=3D>'myPortaleP=
rofile' ] );<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"> <o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">error_text:The requ=
est referenced an attribute that does not exist<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">error_code:16<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">server_error:GLPRDB=
050E Attribute myPortaleProfile was not found in the schema definition.<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">error:GLPRDB050E At=
tribute myPortaleProfile was not found in the schema definition.<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Exiting.<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Any help you can pr=
ovide is appreciated.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p> </o:p></=
span></p>
<p class=3D"MsoNormal"><a href=3D"mailto:[email protected]">Stev=
[email protected]</a><o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>
--_000_BY1PR03MB14654EB65A5172DA3F3975B4804A0BY1PR03MB1465namp_--