<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. I want to set that from a shell script. 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"). 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><?xml version="1.0" encoding="UTF-8"?></div><div><!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><plist version="1.0"></div><div><dict></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><key>DHCP LDAP</key></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><dict></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><key>/Sets/5FB6FAF4-3397-4981-BCC0-4D8FE463CA1C</key></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><true/></div><div><span class="Apple-tab-span" style="white-space:pre">        </span></dict></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><key>Search Node PlugIn Version</key></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><string>Search Node PlugIn Version 1.7</string></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><key>Search Policy</key></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><integer>1</integer></div><div></dict></div><div></plist></div><div><br></div><div><br></div><div>Notice the key "DHCP LDAP". You need to set the value of the key to true, as it is here (<true/>), if you want to gather the LDAP info from DHCP. 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. BTW, the key value (in this case <key>/Sets/5FB6FAF4-3397-4981-BCC0-4D8FE463CA1C</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. 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"? 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"> </span><br>Director, Information Technology<span class="Apple-converted-space"> </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"> </span><br><br>The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201<span class="Apple-converted-space"> </span><br>T 214.758.6813 | F 214.758.6907 | C 940.312.2475<span class="Apple-converted-space"> </span><br><br><img src="http://extranet.integerdallas.com/Integer/signature/green.jpg"><span class="Apple-converted-space"> </span><br><br></div></div></div></div><br><br><br><hr>--<br>The information contained in this email transmission is solely for the addressee(s) named above and is privileged and/or confidential. If the reader of this message is not the intended recipient or the person responsible to deliver it to the intended recipient; he or she is prohibited from reading or disclosing the information contained in this transmission. Any examination, use, dissemination, distribution, or copying of this communication is strictly prohibited. Please contact us immediately by telephone for instructions if you have received this communication in error: (214) 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 information contained in this email transmission is solely for the addressee(s) named above and is privileged and/or confidential. If the reader of this message is not the intended recipient or the person responsible to deliver it to the intended recipient; he or she is prohibited from reading or disclosing the information contained in this transmission. Any examination, use, dissemination, distribution, or copying of this communication is strictly prohibited. Please contact us immediately by telephone for instructions if you have received this communication in error: (214) 758-6800<BR />
</body></html>