When sudo is run the first time, something about the user account changes
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Thanks. Brant Sears _______________________________________________ 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... I'm trying to execute a bash script from my application. I'm using the Security framework to call AuthorizationExecuteWithPrivileges() on the sudo command passing the path to my script in as an argument. This has the effect that my script runs as root. This works as I would expect (i.e. the user is prompted when I create the authentication object and then the script executes as root), except on user accounts where "sudo" has never been used. I notice that when I invoke sudo for the first time, I get a warning message from the OS. And obviously other things about the user account change as well. What exactly changes when you call sudo for the first time? Also, is there another way I can invoke my script to work correctly in this instance? Another means by which it can run as root? This email sent to site_archiver@lists.apple.com
participants (1)
-
Brant Sears