<html><head><style media="all" type="text/css">         #sig {                 font:12px Arial, Helvetica, sans-serif;                 line-height: 13px;                 color: #4c4c4c ;                 margin: 6px 0;                 padding: 6px;         }         #sig .row a:link, #sig .row a:visited {                 color: #d02d33;                 text-decoration: none;         }         #sig .row a:hover {                 color: #4c4c4c;         } </style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">In the Directory Utility application, when you open the LDAP service you can tell LDAP to get its information from DHCP. &nbsp;I want to set that from a shell script. &nbsp;Using defaults write was my first thought, but the plist that controls that setting is not in the domain ("Domain SearchNodeConfig.plist does not exist"). &nbsp;So, that means in order to "trip" the flag you need to edit the plist by hand.<div><br></div><div>Now, the plist contains information in this format:</div><div><br></div><div><div>&lt;?xml version="1.0" encoding="UTF-8"?></div><div>&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<a href="http://www.apple.com/DTDs/PropertyList-1.0.dtd">http://www.apple.com/DTDs/PropertyList-1.0.dtd</a>"></div><div>&lt;plist version="1.0"></div><div>&lt;dict></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;key>DHCP LDAP&lt;/key></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;dict></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;key>/Sets/5FB6FAF4-3397-4981-BCC0-4D8FE463CA1C&lt;/key></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;true/></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;/dict></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;key>Search Node PlugIn Version&lt;/key></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;string>Search Node PlugIn Version 1.7&lt;/string></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;key>Search Policy&lt;/key></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;integer>1&lt;/integer></div><div>&lt;/dict></div><div>&lt;/plist></div><div><br></div><div><br></div><div>Notice the key "DHCP LDAP". &nbsp;You need to set the value of the key to true, as it is here (&lt;true/>), if you want to gather the LDAP info from DHCP. &nbsp;Since I cannot use defaults write to do this, that means I have to use sed to parse out the key and then inject the true flag. &nbsp;BTW, the key value (in this case&nbsp;&lt;key>/Sets/5FB6FAF4-3397-4981-BCC0-4D8FE463CA1C&lt;/key>) is different for each machine, so just dropping the plist into each machine won't work (I tried).</div><div><br></div><div>Hope that helps.</div><div>  <div><div id="sig">         <div class="row"><br>        <strong>Steve Wood</strong>        <br>        Director, Information Technology        <br>        <a href="mailto:swood@integerdallas.com">swood@integerdallas.com</a>        <br><br>        The Integer Group  |  1999 Bryan St.  |  Ste. 1700  |  Dallas, TX 75201        <br>        T 214.758.6813  |  F 214.758.6907  |  C 940.312.2475        <br>    <br>        <img src="http://extranet.integerdallas.com/Integer/signature/green.jpg">             <br><br>         </div> </div></div> </div><br><div><div>On Jun 6, 2008, at 9:18 AM, Clinton Blackmore wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I'm afraid I'm not familiar with the change you want to make, but if you want to edit a plist, you want to use the "defaults" command. &nbsp;It will even edit binary plist files.</div><div><br></div><div>If I misunderstood the question, though, it may be that you need to manipulate the data already within the plist (and are thinking of piping a defaults read into sed into defaults write), in which case, we are better able to help if we have details on the transformation you have in mind.</div><div><br></div><div>Cheers,</div><div>Clinton Blackmore</div><div><br></div><div><br></div><br><div><div>On 5-Jun-08, at 9:50 AM, Steve Wood wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Anyone have a script to trip the "Add DHCP Supplied LDAP"? &nbsp;The only way I can see to do it is via a shell script using sed or something else to edit the plist file.<br><div><div><div id="sig" style="font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 13px; color: rgb(76, 76, 76); margin-top: 6px; margin-right: 0px; margin-bottom: 6px; margin-left: 0px; padding-top: 6px; padding-right: 6px; padding-bottom: 6px; padding-left: 6px; "><div class="row"><br><strong>Steve Wood</strong><span class="Apple-converted-space">&nbsp;</span><br>Director, Information Technology<span class="Apple-converted-space">&nbsp;</span><br><a href="mailto:swood@integerdallas.com" style="color: rgb(208, 45, 51); text-decoration: none; ">swood@integerdallas.com</a><span class="Apple-converted-space">&nbsp;</span><br><br>The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201<span class="Apple-converted-space">&nbsp;</span><br>T 214.758.6813 | F 214.758.6907 | C 940.312.2475<span class="Apple-converted-space">&nbsp;</span><br><br><img src="http://extranet.integerdallas.com/Integer/signature/green.jpg"><span class="Apple-converted-space">&nbsp;</span><br><br></div></div></div></div><br><br><br><hr>--<br>The&nbsp;information&nbsp;contained&nbsp;in&nbsp;this&nbsp;email&nbsp;transmission&nbsp;is&nbsp;solely&nbsp;for&nbsp;the&nbsp;addressee(s)&nbsp;named&nbsp;above&nbsp;and&nbsp;is&nbsp;privileged&nbsp;and/or&nbsp;confidential.&nbsp;&nbsp;If&nbsp;the&nbsp;reader&nbsp;of&nbsp;this&nbsp;message&nbsp;is&nbsp;not&nbsp;the&nbsp;intended&nbsp;recipient&nbsp;or&nbsp;the&nbsp;person&nbsp;responsible&nbsp;to&nbsp;deliver&nbsp;it&nbsp;to&nbsp;the&nbsp;intended&nbsp;recipient;&nbsp;he&nbsp;or&nbsp;she&nbsp;is&nbsp;prohibited&nbsp;from&nbsp;reading&nbsp;or&nbsp;disclosing&nbsp;the&nbsp;information&nbsp;contained&nbsp;in&nbsp;this&nbsp;transmission.&nbsp;&nbsp;Any&nbsp;examination,&nbsp;use,&nbsp;dissemination,&nbsp;distribution,&nbsp;or&nbsp;copying&nbsp;of&nbsp;this&nbsp;communication&nbsp;is&nbsp;strictly&nbsp;prohibited.&nbsp;&nbsp;Please&nbsp;contact&nbsp;us&nbsp;immediately&nbsp;by&nbsp;telephone&nbsp;for&nbsp;instructions&nbsp;if&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp;communication&nbsp;in&nbsp;error:&nbsp;(214)&nbsp;758-6800<br>_______________________________________________<br>Casper mailing list<br><a href="mailto:Casper@list.jamfsoftware.com">Casper@list.jamfsoftware.com</a><br><a href="http://list.jamfsoftware.com/mailman/listinfo/casper">http://list.jamfsoftware.com/mailman/listinfo/casper</a><br></div></span></blockquote></div><br> </div></blockquote></div><br></div><BR />
<BR />
<HR />
--<BR />
The&nbsp;information&nbsp;contained&nbsp;in&nbsp;this&nbsp;email&nbsp;transmission&nbsp;is&nbsp;solely&nbsp;for&nbsp;the&nbsp;addressee(s)&nbsp;named&nbsp;above&nbsp;and&nbsp;is&nbsp;privileged&nbsp;and/or&nbsp;confidential.&nbsp;&nbsp;If&nbsp;the&nbsp;reader&nbsp;of&nbsp;this&nbsp;message&nbsp;is&nbsp;not&nbsp;the&nbsp;intended&nbsp;recipient&nbsp;or&nbsp;the&nbsp;person&nbsp;responsible&nbsp;to&nbsp;deliver&nbsp;it&nbsp;to&nbsp;the&nbsp;intended&nbsp;recipient;&nbsp;he&nbsp;or&nbsp;she&nbsp;is&nbsp;prohibited&nbsp;from&nbsp;reading&nbsp;or&nbsp;disclosing&nbsp;the&nbsp;information&nbsp;contained&nbsp;in&nbsp;this&nbsp;transmission.&nbsp;&nbsp;Any&nbsp;examination,&nbsp;use,&nbsp;dissemination,&nbsp;distribution,&nbsp;or&nbsp;copying&nbsp;of&nbsp;this&nbsp;communication&nbsp;is&nbsp;strictly&nbsp;prohibited.&nbsp;&nbsp;Please&nbsp;contact&nbsp;us&nbsp;immediately&nbsp;by&nbsp;telephone&nbsp;for&nbsp;instructions&nbsp;if&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp;communication&nbsp;in&nbsp;error:&nbsp;(214)&nbsp;758-6800<BR />
</body></html>