Re: do shell script
Re: do shell script
- Subject: Re: do shell script
- From: Michael Slomski <email@hidden>
- Date: Fri, 13 Feb 2004 15:18:03 +0100
Hello together,
since I don't got an solution, here a new try:
I have 2 accounts on my computer:
mslomski without admin privs,
Titan with admin privs
User mslomski will get an error (not in sudoers file)
User Titan can run the script witout problems.
tell application "Finder"
activate
do shell script "/usr/sbin/bless -folder9 '/Volumes/System
OS9/Systemordner' -setOF" password "passwOfTitan" with administrator
privileges
restart
end tell
What should I change, that user mslomski can run it also successfully?
I have tried the following from the terminal:
Disneyland:~ mslomski$ su Titan
Password:
Disneyland:/volumes/datenplatte/users/mslomski titan$ sudo /usr/sbin/bless
-folder9 '/Volumes/System OS9/Systemordner' -setOF
Disneyland:/volumes/datenplatte/users/mslomski titan$ exit
exit
Disneyland:~ mslomski$
After that, systempreferences show the new blessed folder.
It9s no problem for me to put the passwords in the script (passwOfTitan)
only a placeholder.
Best regards
Michael Slomski
--- Computerkartographie M. Slomski Kartographie Systemberatung &
Betreuung f|r Apple Macintosh
Schnorr-von-Carolsfeld-Str. 19 D-81927 M|nchen
Tel.: ++49 +89-929 40 57 oder ++49 +177-44 57 990 Fax.: ++49 +89-939 311 71
Email: email@hidden
>
Von: Michael Terry <email@hidden> Datum: Tue, 10 Feb 2004 13:46:29 -0800
>
An: AppleScript Users <email@hidden> Betreff: Re: do
>
shell script
>
>
On Feb 10, 2004, at 1:03 PM, Michael Slomski wrote:
>
>
> The following script will run fine if the user which is executing it has
>
> admin privs. What can i do if a user without admin privs can run this
script?
>
> Is there a possibility to run it with something
>
>
>
> Run script as user xxx
>
>
>
> tell application "Finder" activate do shell script "/usr/sbin/bless
-folder9
>
> '/Volumes/System OS9/Systemordner' -setOF" password "myAdminPassw" with
>
> administrator privileges restart end tell
>
>
>
>
Doesn't it work, anyway?
>
>
Or are you saying that you don't want to include the password in the script
>
where unprivileged users can see it? In that case, I think you can store
the
>
password in a keychain file that the underprivileged user can't access and
>
have the script access it at need.
>
>
>
Mike _______________________________________________ applescript-users
>
mailing list | email@hidden Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users Do not post
>
admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.