Skip to main content
Question

Installing Command Line Tools via Self Service


Forum|alt.badge.img+4

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.

8 replies

MatthewGV
Forum|alt.badge.img+7
  • Contributor
  • 41 replies
  • January 21, 2022

Found this with a quick search https://gist.github.com/brysgo/9007731


ljcacioppo
Forum|alt.badge.img+17
  • Contributor
  • 183 replies
  • January 21, 2022

Forum|alt.badge.img+11
  • Employee
  • 59 replies
  • January 21, 2022

We download the Installer .pkg from the Developer page here:

 

https://developer.apple.com/download/all

 

And push it out via a Policy.

 


mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • January 21, 2022

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.


Forum|alt.badge.img+3
  • New Contributor
  • 27 replies
  • April 13, 2022
awoodbury wrote:

We download the Installer .pkg from the Developer page here:

 

https://developer.apple.com/download/all

 

And push it out via a Policy.

 


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?


donmontalvo
Forum|alt.badge.img+36
  • Legendary Contributor
  • 4293 replies
  • April 23, 2024
atrystan wrote:

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?


@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


Forum|alt.badge.img+3
  • New Contributor
  • 27 replies
  • April 26, 2024
mm2270 wrote:

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.


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.


Forum|alt.badge.img+3
  • New Contributor
  • 27 replies
  • April 29, 2024
donmontalvo wrote:

@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


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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings