Skip to content

Instantly share code, notes, and snippets.

@zachselby
Created June 20, 2019 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachselby/14ac793977fc46a8315d0f0fa14def4e to your computer and use it in GitHub Desktop.
Save zachselby/14ac793977fc46a8315d0f0fa14def4e to your computer and use it in GitHub Desktop.
Use Homebrew for Multiple Users
#!/bin/bash
# Create a new group, brew
sudo dseditgroup -o create brew
# Change owner to brew group on brew assets
sudo chgrp -R brew $(brew --prefix)/*
# Change permissions to brew group
sudo chmod -R g+w $(brew --prefix)/*
# Add a user to the brew group
sudo dseditgroup -o edit -a userOne -t user brew
# Add another user to the brew group
sudo dseditgroup -o edit -a userTwo -t user brew
# Validate links, etc.
brew doctor
# Make any corrections from the `brew doctor` warnings
# Run brew doctor to validate fixes
brew doctor
# Make sure it's working without error, with an update
brew update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment