Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sidekick is a helpful little tool which adjusts the system settings based on geographical location.

I added an action which will execute a sudo command-line command. The problem is that the Terminal pops up and asks me for the password. Is there a way to allow Sidekick to execute sudo without asking for a password?

share|improve this question
The real question is, do you really want to? sudo requires a password after regular intervals for a good reason. – Blazemonger Oct 28 '11 at 18:46
I want to enable and disable some sharing settings: turning file, web sharing and remote management on and off. This is possible without a password anyways via System Preferences. Sadly this is not supported by AppleScript. – Lenar Hoyt Oct 28 '11 at 18:49
up vote 3 down vote accepted

You can disable password prompt when calling sudo in combination with certain commands by editing the sudoers file. This is done by opening a terminal and running sudo visudo. You have to add the follwing lines

Cmnd_Alias SIDEKICK_CMDS = /full/path/to/the/command1,  /full/path/to/the/command2


Be careful with this, as it may lead to security risks. It enables anyone logged in with your account ( so not just sidekick) to run the commands in the list without a password prompt.

For a full description of the sudoers options check the manpage : man sudoers

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.