Posted on 01-21-2022 08:50 AM
Hi
We are in the process of removing local admin rights for users machines. We are trying to figure out how to install command line tools, such as xcode, from self service. The issue we are foreseeing is authentication. We want to write scripts to take care of these installs and wanted to see if anybody else has dealt with something like this and may have some tips.
Posted on 01-21-2022 09:08 AM
Found this with a quick search https://gist.github.com/brysgo/9007731
Posted on 01-21-2022 09:10 AM
This might be an option as well:
https://github.com/palantir/jamf-pro-scripts/blob/main/scripts/Install%20Xcode%20Command%20Line%20To...
Posted on 01-21-2022 09:23 AM
We download the Installer .pkg from the Developer page here:
https://developer.apple.com/download/all
And push it out via a Policy.
Posted on 04-13-2022 04:05 PM
We are installing XCode using the Mac Apps (i.e. VPP) to keep it updated automatically. Have you found problems with compatibility by deploying the CLTs manually?
Posted on 04-23-2024 09:29 AM
@atrystan Hmm...fast forward two years, not sure if this is a recent change.
Command Line Tools are now updated via Apple Software Update.
Looks like if it is installed it'll be kept updated there. #questionmark
Posted on 04-29-2024 02:19 PM
This is also my experience. The change has also made it so that only admins can accept the license agreement on launch. As a result, it is necessary to accept terms and conditions as a root user during install.
In the end, we discovered that you can use the App Store Apps to get Xcode installed on the device during enrollment and then add an item in Self Service that does this as root:
xcodebuild -license accept
xcodebuild -runFirstLaunch
Once you do that, regular users can install and launch them.
Posted on 01-21-2022 09:43 AM
I do the same as @awoodbury, since it's free to set up a basic Apple developer account that has access to all the downloads for Xcode, command line tools and others.
Posted on 04-26-2024 02:42 PM
The problem is that Apple has made it so that only admins can launch Xcode now since they assume that only admins should be able to run a debugger. Specifically, non-admins are prevented from accepting the license agreement. In the end, we discovered that you can use the App Store Apps to get Xcode installed on the device during enrollment and then add an item in Self Service that does this as root:
xcodebuild -license accept
xcodebuild -runFirstLaunch
Once you do that, regular users can install and launch them.