When sudo is run the first time, something about the user account changes
When sudo is run the first time, something about the user account changes
- Subject: When sudo is run the first time, something about the user account changes
- From: Brant Sears <email@hidden>
- Date: Fri, 15 Jan 2010 23:20:52 -0600
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?
Thanks.
Brant Sears
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden