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?

  • 1
    The real question is, do you really want to? sudo requires a password after regular intervals for a good reason. gratisoft.us/sudo/sudo.man.html Oct 28, 2011 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, 2011 at 18:49

1 Answer 1


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .