Alternative to executing commands with AuthorizationExecuteWithPrivileges as root

With AuthorizationExecuteWithPrivileges deprecated in 10.7, which is an alternative to programmable commands like launchctll, chmod, chown etc ... as root? I need to support 10.5, so SMJobBless is not an option.

A use case is used here. I create a plist for the LaunchDaemons daemon at runtime and must copy the daemon and plist to the appropriate places and use launchctl to upload / download the plist

Do I understand correctly that I need root to perform these actions?

+3
source share
1 answer

you can use applescript

do shell script "sh /Users/new/load.sh" with administrator privileges
0
source

All Articles