1

I have a program called ServiceCenter from Native Instruments which is basically a downloader and installer for updates etc. But every time I open it it prompts for my password to allow it to make changes.

Is there any way to whitelist trusted software so it doesn't prompt for admin password?

2

Yes, this can be achieved with the NOPASSWD directive in the /etc/sudoers file. Editing this file should only be done by an experienced user, because it is a system-critical file and mistakes could be difficult to troubleshoot.

  1. Edit the file from the terminal with sudo visudo -f /etc/sudoers
  2. Add this line under the user privilege specification section, %admin ALL= NOPASSWD: /absolute/path/to/your/program
  3. Save the file.

The visudo command uses your editor set in the VISUAL variable or if that is unset, the EDITOR variable. Please refer to the visudo(8) man page.

  • Thanks for the reply but unfortunately I tried it and it didn't work... It is still asking for password! – doovers Feb 28 '14 at 5:14
  • The procedure will work if your user is a member of the %admin group (i.e. has administrator privileges). Make sure the path is correct. It will have to point to a (most likely) binary file inside the Program.app folder. For example, for Sublime Text, the correct path is /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl. If you do not know the path, try running ps aux when the program is running and looking for it in the list. – insignificant zebra Feb 28 '14 at 5:20
  • Oh right thats probably the issue then I'll try that! I work a lot with sublime actually, will it allow it to modify files regardless of permissions? – doovers Feb 28 '14 at 5:24
  • 1
    @Guy Hughes's solution works great for me. To add a little bit more details, 1) instead of %admin (group), you can use your user-id (the output from whoami); 2) Use backslash to escape whitespace if there is any in the program path. E.g. /Applications/AnyConnect\ Secure\ Mobility\ Client.app/Contents/MacOS/AnyConnect\ Secure\ Mobility\ Client. – tdwong.star Oct 31 '15 at 5:39
  • 1
    @Orion Apple stopped updating the online Darwin man pages around OS X 10.9 and recently took them offline. You can view an archive of the page, but for up-to-date docs, run man 8 visudo in a terminal. – Zenexer Jan 7 at 9:09

You must log in to answer this question.

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