sudo on OSX

Simon Lord slord at mac.com
Sun Oct 6 02:19:01 EDT 2002


Hi all, I have a minor problem with the StartupItems under OSX.  It's 
owned by root.  So the application I'm writing can't set a script there 
to launch on startup.  This is likely a security measure so my option 
is to send a command to sudo and write/copy the script to the 
StartupItems directory.  Problem is how does one do that?  I'll need to 
ask the user to enter the password (root only, users cannot modify) but 
then how do I actually run it in a command line *with* the password?  
IE,. I don't want to run the script and have the Terminal say "ok, 
what's the password", I want to include the password in the command to 
copy the script to the StartupItems folder.

Any ideas?

Sincerely,
Simon




More information about the metacard mailing list