<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The issue is most likely that the batch script runs without elevated privileges. It ends up running as a standard user when run as "An application" or launchd process.<div>&nbsp;<div><div>I can't recall how to fix this right off, but I've run across this problem a few times when trying to make applescripts into applications, and making my own installers with xcode and packagemaker. Everything would run great when I physically launchedit, but once I saved it as an application, it could not perform the tasks needed.</div><div><br></div><div><div>Sorry I can't be of more help right now, but I think I have you down the right path.</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; 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: 0px; "><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-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: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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-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: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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-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: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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-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: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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-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: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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-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: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font class="Apple-style-span" face="'Times New Roman'"><b><i><span class="Apple-style-span" style="font-family: Helvetica; font-style: normal; font-weight: normal; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font class="Apple-style-span" face="'Times New Roman'"><b><i><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Times New Roman'; "><b><i><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Times New Roman'; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium; "><font class="Apple-style-span" face="'Times New Roman'"><b><i><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Times New Roman'; "><b><i>Brian Bulmer</i></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Times New Roman'; "><i>Managed Desktop Services Consultant</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Times New Roman'; "><i>Information Services and Technology, MIT</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Times New Roman'; "><i>Office: (617) 253-2163</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Times New Roman'; color: rgb(23, 77, 174); "><a href="mailto:bbulmer@mit.edu"><i>bbulmer@mit.edu</i></a><span style="color: rgb(0, 0, 0); "><i>&nbsp;&nbsp;</i></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Times New Roman'; color: rgb(23, 77, 174); "><span style="text-decoration: underline; "><a href="http://ist.mit.edu/about/org/ds"><i>http://ist.mit.edu/about/org/ds</i></a></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Times New Roman'; "><i>_______________________________________</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Helvetica; color: rgb(152, 102, 51); ">Please note: &nbsp;MIT IS&amp;T staff will NEVER ask you for your password, nor any email requesting your password information. &nbsp;Please ignore any email messages that claim to require you to provide such information.</div></i></b></font></span></font></div></i></b></div></i></b></font></div></div></div></div></div></div></div></span></i></b></font></div></div></div></div></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br><div><div>On Oct 3, 2009, at 8:49 PM, Duncan Kincaid wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>i've a bash shell script which runs perfectly when run from the &nbsp;<br>command line.<br>specifically, the kinit and klist below works as expected:<br><br>/usr/bin/kinit -k -t /etc/something.keytab <a href="mailto:daemon/something.mit.edu@ATHENA.MIT.EDU">daemon/something.mit.edu@ATHENA.MIT.EDU</a><br>/usr/bin/klist<br><br>however when launching this same shell script as a LaunchDaemon, the &nbsp;<br>kinit and klist fail.<br>the system log reports:<br><br>kinit: Error getting initial tickets: Internal credentials cache error<br>klist: No Kerberos 5 tickets in credentials cache<br><br>is this a bug or a feature (of my stupidity)?<br>i find it odd that kinit simply fails when when the script is &nbsp;<br>controlled by launchd.<br>(note that all other stuff in the script runs fine when controlled by &nbsp;<br>launchd. it is just the kinit and klist).<br><br>: Mac OS X 10.5.8 on PPC Xserve<br><br>with thanks<br>dk<br><br>| <br>| <br>| <br>| <br>| <br>| <br>| <br>| <br>| <br>||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<br>duncan kincaid<br>cron | mit school of architecture and planning<br>_______________________________________________<br>Macpartners mailing list<br><a href="mailto:Macpartners@mit.edu">Macpartners@mit.edu</a><br>http://mailman.mit.edu/mailman/listinfo/macpartners<br></div></blockquote></div><br></div></div></div></div></body></html>