Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Terminal & "sudo" with "password" & "with administrative privileges"



I used to run a script as follows that worked in a previous (10.2 / 10.3?)
Mac OS, but is not working under the current 10.4.  The machine in use now
is new; built from scratch.

tell application "Terminal"

   activate
   do shell script "sudo chown -R user01 /Users/user01" password
"thepassword" with administrator privileges

end tell

(Note: "thepassword" is the Administrator password.)

"AppleScript Error.  Terminal got an error: A privilege violation occurred."

I also tried invoking sudo (and entering the password manually) from
Terminal, then running the script; same results.

Running this command manually works.

Doing an ls (prior to running the command) I see:

drwxr-xr-x 15 user01 staff 510 Oct 10 2005 user01

Ideas?  Thanks.

Bob


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.