[xcode] Authorize a non-admin developer in Xcode / Mac OS

I use a standard user account for my daily tasks on Mac OS. Since upgrading to Snow Leopard I am asked to do the following when a program is run from within Xcode:

"Type the name and password of a user in the 'Developer Tools' group to allow Developer Tools Access to make changes"

While I know the admin username/password, this is annoying (though only required once per login).

The developer tools access is asking for rights to "system.privilege.taskport.debug" from application gdb-i386-apple-darwin.

What is the best way around this?

This question is related to xcode macos osx-snow-leopard privileges dscl

The answer is


$ dseditgroup -o edit -u <adminusername> -t user -a <developerusername> _developer

I am on Snow Leopard and this one didn't quite work for me. But the following procedure worked:

  1. First added another account with admin privileges by ticking "Allow user to administer this computer" under Accounts, for example an account with username test
  2. Logged into the test account
  3. Launched Xcode, compiled and ran my iPhone project. All ok, no errors were thrown related to permissions
  4. Logged out of the test account
  5. Logged in with the another account having admin privileges
  6. Took away the admin priviliges from the test account by removing the tick from "Allow user to administer this computer" under Accounts
  7. Logged back into the test account
  8. Deleted the iPhone project directory and again checked out from the repository (in my case svn)
  9. Launched Xcode, compiled and ran the project. I didn't get any errors and the App ran well in the iPhone Simulator.

Answer suggested by @Stacy Simpson:

We are struggling with the issue described in these threads and none of the resolutions seem to work:

As I'm new to SO, I cannot post in either thread. (The first one is actually closed and I disagree with the localization reasoning...)

Anyway, we created a work-around using AppleScript that folks may be interested in. The script below should be executed asynchronously prior to launching your automated test:

osascript <script name> <password> &

Here is the script:

on run argv
    # Delay for 10 seconds as this script runs asynchronously to the automation process and is kicked off first.
    delay 10

    # Inspect all running processes
    tell application "System Events"
        set ProcessList to name of every process
        # Determine if authentication is being requested
        if "SecurityAgent" is in ProcessList then
            # Bring this dialogue to the front
            tell application "SecurityAgent" to activate
            # Enter provided password
            keystroke item 1 of argv
            keystroke return
        end if
    end tell
end run

Probably not very secure, but it's the best work-around we've come up with to allow tests to run without requiring user intervention.

Hopefully, I can get enough points to post the answer; or, someone can unprotect this question. Regards.


For me, I found the suggestion in the following thread helped:

Stop "developer tools access needs to take control of another process for debugging to continue" alert

It suggested running the following command in the Terminal application:

sudo /usr/sbin/DevToolsSecurity --enable

You should add yourself to the Developer Tools group. The general syntax for adding a user to a group in OS X is as follows:

sudo dscl . append /Groups/<group> GroupMembership <username>

I believe the name for the DevTools group is _developer.


Here is a better solution from
Mac OS X wants to use system keychain when compiling the project

  1. Open Keychain Access.
  2. In the top-left corner, unlock the keychain (if it is locked).
  3. Choose the System keychain from the top-left corner.
  4. Find your distribution certificate and click the disclosure triangle.
  5. Double-click ‘Private key’ under your distribution certificate.
  6. In the popup, go to the Access Control tab.
  7. Select ‘Allow all applications to access this item’.
  8. Save the changes.
  9. Close all windows.
  10. Run the application.

After you run:

sudo dscl . append /Groups/_developer GroupMembership <username>

per the answer above, you may still get prompted to enter in your own password:

We need authorization from an admin user to run the debugger. This will only happen once per login session.

What it really means is any _developer groupmember user so just your non-admin user/password will work here but to get rid of it completely (no prompts after a reboot) you'll also need to run:

sudo DevToolsSecurity -enable

(running it with sudo as an admin user/as root will make it so you can do it remotely without a gui password prompt)


Ned Deily's solution works perfectly fine, provided your user is allowed to sudo.

If he's not, you can su to an admin account, then use his dscl . append /Groups/_developer GroupMembership $user, where $user is the username.

However, I mistakenly thought it did not because I wrongly typed in the user's name in the command and it silently fails.

Therefore, after entering this command, you should proof-check it. This will check if $user is in $group, where the variables represent respectively the user name and the group name.

dsmemberutil checkmembership -U $user -G $group

This command will either print the message user is not a member of the group or user is a member of the group.


Finally, I was able to get rid of it using DevToolsSecurity -enable on Terminal. Thanks to @joar_at_work!

FYI: I'm on Xcode 4.3, and pressed the disable button when it launched for the first time, don't ask why, just assume my dog made me do it :)


Examples related to xcode

Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 iPhone is not available. Please reconnect the device Make a VStack fill the width of the screen in SwiftUI error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1 Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Xcode 10: A valid provisioning profile for this executable was not found Xcode 10, Command CodeSign failed with a nonzero exit code

Examples related to macos

Problems with installation of Google App Engine SDK for php in OS X dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error running php after installing node with brew on Mac Could not install packages due to an EnvironmentError: [Errno 13] How do I install Java on Mac OSX allowing version switching? Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Can't compile C program on a Mac after upgrade to Mojave You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user) How can I install a previous version of Python 3 in macOS using homebrew? Could not install packages due to a "Environment error :[error 13]: permission denied : 'usr/local/bin/f2py'"

Examples related to osx-snow-leopard

Check mySQL version on Mac 10.8.5 PostgreSQL error 'Could not connect to server: No such file or directory' Eclipse hangs on loading workbench Running script upon login mac Authorize a non-admin developer in Xcode / Mac OS How do you uninstall MySQL from Mac OS X? can't start MySql in Mac OS 10.6 Snow Leopard Easiest way to activate PHP and MySQL on Mac OS 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion)?

Examples related to privileges

Check Postgres access for a user Give all permissions to a user on a PostgreSQL database ORA-01950: no privileges on tablespace 'USERS' Getting ORA-01031: insufficient privileges while querying a table instead of ORA-00942: table or view does not exist Remove privileges from MySQL database Permission denied for relation How to view user privileges using windows cmd? Grant all on a specific schema in the db to a group role in PostgreSQL How to show all privileges from a user in oracle? What precisely does 'Run as administrator' do?

Examples related to dscl

Authorize a non-admin developer in Xcode / Mac OS