Apple Script en root ?

bobo

Membre actif
19 Octobre 2001
270
0
Encore une question est-ce que qqun saurait comment faire un applescript qui disposerait des accès "root" ?

Bo.
 
<BLOCKQUOTE><font size="1" face="Verdana, Geneva">quote:</font><HR>Posté à l'origine par bobo:
Encore une question est-ce que qqun saurait comment faire un applescript qui disposerait des accès "root" ?

Bo.
<HR></BLOCKQUOTE>

En fait, on peut faire celà avec la fonction

<BLOCKQUOTE><font size="1" face="Verdana, Geneva">quote:</font><HR>
do shell script: execute a shell script or command
do shell script plain text -- the command or shell script to execute. Examples are ‘ls’ or ‘/bin/ps -auxwww’
[administrator privileges boolean] -- execute the command as the administrator
[password plain text] -- use this administrator password to avoid a password dialog
[Result: plain text] -- the command output <HR></BLOCKQUOTE>

mais celà exécute uniquement une commande terminal
cool.gif


À UTILISER AVEC BEAUCOUP DE PRÉCAUTIONS
j'ai déjà vidé tout mon dossier Users grâce à ça en voulant faire un script qui vide des corbeilles récalcitrantes...
frown.gif
 
Le seul moyen que je connaisse c'est de faire de la manière suivante:

do shell script "tonscript" with administrator privileges

ce qui va faire apparaitre une fenêtre dans laquelle il va te demander ton mot de passe
wink.gif


En passant je te déplace sur le forum Developpement
wink.gif