I am having a hell of a time trying to Sudo with an AppleScript.
Heres the code…
do shell script “sudo ifconfig en0 down; sudo ifconfig en0 up”
When executed, it says AppleScript Error password: password: . Any ideas how this can be done to automate the password? I have tried everything I know, and to no avail. Oh, thanks for your help in advance
METHOD #2, a little bit more secure:
If you’re not worried about ANYONE doing sudo ipconfig’s without a password (it has to be your username anyway so not much of a concern there) on your system, you can have sudo automatically run it without a password. Here’s how!
$ sudo visudo password:
You’ll be presented with the…
View original post 183 altre parole