Closed tina-junold closed 3 years ago
If your users have admin rights then the easiest thing is to use the official Homebrew install process. My script is only designed for use when users don't have rights.
I must also admit I haven't done any testing on Big Sur yet.
A next step is to degrade the user to a normal user during the enrollment, but for testing purposes i disabled this.
I'm getting the same using a standard user, on 10.15.7 and running the script from a jamf policy. also had exactly the same on 11.2
Thu Mar 18 06:54:55 PDT 2021 - Checking for Xcode Command Line Tools installation
Thu Mar 18 06:54:55 PDT 2021 - Installing Xcode Command Tools
Software Update Tool
Downloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Installing Command Line Tools for Xcode
Done with Command Line Tools for Xcode
Done.
Thu Mar 18 14:03:49 GMT 2021 - Installing Homebrew
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 128 100 128 0 0 492 0 --:--:-- --:--:-- --:--:-- 492
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 626k 0 626k 0 0 373k 0 --:--:-- 0:00:01 --:--:-- 590k
100 1732k 0 1732k 0 0 658k 0 --:--:-- 0:00:02 --:--:-- 859k
100 2316k 0 2316k 0 0 772k 0 --:--:-- 0:00:02 --:--:-- 972k
chown: /usr/local/*: No such file or directory
chmod: /usr/local/*: No such file or directory
mkdir: /usr/local/var/homebrew/locks: Permission denied
Error: Can't create vendor-install-ruby lock in /usr/local/var/homebrew/locks!
Fix permissions by running:
sudo chown -R $(whoami) /usr/local/var/homebrew
Error: Failed to install Homebrew Portable Ruby (and your system version is too old)!
export PATH="${HOMEBREW_PREFIX}/opt/openssl/bin:$PATH"
Thu Mar 18 14:03:56 GMT 2021 - Updating Homebrew
Error: /usr/local/Cellar is not writable. You should change the
ownership and permissions of /usr/local/Cellar back to your
user account:
sudo chown -R $(whoami) /usr/local/Cellar```
I've never had to install homebrew before as a default so I have no idea what is meant to happen... need to look into that myself.
so I did a load of testing.. and I found out that the user:group permissions weren't being applied, this is on 10.15.7 and 11.x.
so I modified this line:
chown -R "${consoleuser}":_developer "${HOMEBREW_PREFIX}/*
to be
chown -R "$consoleuser":_developer "${HOMEBREW_PREFIX}/*
and it worked.
I have also made all the permissions assignments specific rather than all at the /usr/local/ level as there are aother apps located in there, e.g. jamf.
That sounds fantastic. Would you prefer to just send it to me or open a pull request?
homebrew- install.sh.zip brewea.sh.zip here you go. Feel free to test it and maybe refine it. I also made a complimentary extension attribute.
Thanks, Mark.
I'll look at that on the weekend.
// Tony
On Thu, Apr 8, 2021 at 6:51 PM Mark @.***> wrote:
homebrew- install.sh.zip https://github.com/Honestpuck/homebrew.sh/files/6277369/homebrew-.install.sh.zip brewea.sh.zip https://github.com/Honestpuck/homebrew.sh/files/6277370/brewea.sh.zip here you go. Feel free to test it and maybe refine it. I also made a complimentary extension attribute.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Honestpuck/homebrew.sh/issues/6#issuecomment-815581257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZIRBIFEDJVH5LXS4I2SSDTHVVCTANCNFSM4XO4LZ2Q .
I'm calling this as fixed.
Hi,
i've used the script during the enrollment complete step (user initiated enrollment on a clean device). Anything i miss? Device is a MacBookPro 15,1 with BigSur. The user is admin.