Re: Odd question relating to preinstall scripts and administrator access
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com On Jul 31, 2008, at 7:54 PM, Cameron Pulsford wrote: I tried modifying my script like this... realUserName=`echo $USER` Does it work with: ? _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... So I seem to have the opposite problem most people have... I am installing something that needs administrator access but I need to run a preinstall script that not only doesn't need these rights, it can't have these rights. I need to run a script that does stuff with "launchctl unload" and when that is given root access it defaults to root, even if the explicit path you give it to unload is ~/Library/xxx for example. That's at least what I have gathered after some research. When I run the script from the terminal it works, but when I run "sudo thescript" it doesn't work. sudo -u $realUserName launchctl unlead $HOME/Library/LaunchAgents/ com.racepoint.*.plist Is this a typo in the post or you used a green argument in the script too? su $USER -c launchctl unload $HOME/Library/LaunchAgents/ com.racepoint.*.plist and in the console I still get the same error message "launchctl: Dubious ownership on file (skipping) /Users/xxx/Library/ LaunchAgents" and then the installer fails. On which OS version? The marriage of Agents and 10.4 has never been a happy one. This email sent to site_archiver@lists.apple.com
participants (1)
-
Stéphane Sudre