Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After reimaging a computer lab workstation, the first time a user tries to build and run an Xcode 4 application, Xcode pops up the "Enable 'Developer Mode' on this Mac?" prompt, requesting an administrator password.

How can I automate this process (via a script), so that I don't have to go around to every workstation, create a new Xcode project, build and run it, and enter the admin password each time the workstations are reimaged?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

As an administrator, run the following commands in Terminal (or Remote Desktop):

/usr/sbin/DevToolsSecurity -enable
/usr/sbin/dseditgroup -o edit -t group -a staff _developer
share|improve this answer

I'm not a directory expert, but this didn't work for me. I found this answer at http://nikhedonia.com/xcode-development-from-non-admin-user/

When you run an Xcode project from a standard (i.e., non-admin) user, you might be asked to enter credentials of a user in the “Developer Tools group.”

You can fix this by adding the (current) user to the group:

sudo dscl . append /Groups/_developer GroupMembership

share|improve this answer

This kinda works:

/usr/sbin/dseditgroup -o edit -t group -a staff _developer

BUT if your users are bound to AD, they won't be in staff. Log in as one of those users and type this in Terminal to find out what group you're in:

ls -l ~

And get back stuff like this:

drwx------+  6 USERID  AD\Domain Users   204 Jul 22 09:31 Desktop

That will show you what group you belong in, for example: "AD/Domain Users" So for my lab, that command would be:

/usr/sbin/dseditgroup -o edit -t group -a "AD/Domain Users" _developer
share|improve this answer

Your Answer

 
discard

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.