Skip to content

Homebrew for a multi-user macos host #5480

Discussion options

You must be logged in to vote

This is actually answered in the Homebrew FAQ, though in a rather obscure way:

If you need to run Homebrew in a multi-user environment, consider creating a separate user account specifically for use of Homebrew.

So basically:

  1. Create an account just for Homebrew (say, hb)
  2. Install Homebrew as user hb (if you have an existing installation, sudo chown -R hb: $(brew --prefix) should fix it right up without the need for reinstallation)
  3. Add an entry to /etc/sudoers (better, create a new /etc/sudoers.d/hb file) with something like the following:
hb     ALL = (ALL) NOPASSWD: /opt/homebrew/bin/brew    # or the output of $(which brew)
  1. Tell all your users to sudo hb brew ..., or write a simple …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@tbrowder
Comment options

@tpkee
Comment options

@gromgit
Comment options

@tpkee
Comment options

@gromgit
Comment options

Answer selected by p-linnane
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants