Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Quotenfrau

macrumors 6502a
Original poster
Mar 6, 2011
522
37
Hi

For security reasons, I use a non-admin account for everyday operations. Unfortunately, I cannot install software (Cask) with the non-admin account. Do I have to log in with the admin account every time to install Cask? Is there a more convenient solution?

Code:
brew install --cask tor-browser
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Auto-updated Homebrew!
==> Updated Homebrew from 65d3c6e950 to 9e4bedad2f.
Updated 2 taps (homebrew/core and homebrew/cask).

You have 2 outdated formulae installed.

==> Installing Cask tor-browser
Warning: macOS's Gatekeeper has been disabled for this Cask
==> Moving App 'Tor Browser.app' to '/Applications/Tor Browser.app'
Password:
john is not in the sudoers file.
This incident has been reported to the administrator.
==> Purging files for version 14.5.5 of Cask tor-browser
Error: Failure while executing; `/usr/bin/sudo -E -- /bin/cp -pR /opt/homebrew/Caskroom/tor-browser/14.5.5/Tor\ Browser.app /Applications/Tor\ Browser.app` exited with 1. Here's the output:
john is not in the sudoers file.
This incident has been reported to the administrator.
 
Hi

For security reasons, I use a non-admin account for everyday operations. Unfortunately, I cannot install software (Cask) with the non-admin account. Do I have to log in with the admin account every time to install Cask? Is there a more convenient solution?

It's definitely possible to run most open source and similar software from a non-admin account. I haven't tested with the latest versions of Brew but I recall earlier versions didn't require an admin account.

However, a non-admin account won't be able to write to /Applications or /opt. I also don't think a non-admin account can disable Gatekeeper when that is required.

Then Sudo among other things doesn't work from a non-admin account by default. You could override this limitation by manually editing the /etc/sudoers file (from an admin account) but that's starting to minimize the difference between an admin account and a non-admin account.

P.S.I also do almost everything from a non-admin account. With the introduction of rootless and similar security controls in more recent macOS, admin accounts are in some sense closer to standard accounts but I also prefer the formal separation.

Code:
brew install --cask tor-browser
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Auto-updated Homebrew!
==> Updated Homebrew from 65d3c6e950 to 9e4bedad2f.
Updated 2 taps (homebrew/core and homebrew/cask).

You have 2 outdated formulae installed.

==> Installing Cask tor-browser
Warning: macOS's Gatekeeper has been disabled for this Cask
==> Moving App 'Tor Browser.app' to '/Applications/Tor Browser.app'
Password:
john is not in the sudoers file.
This incident has been reported to the administrator.
==> Purging files for version 14.5.5 of Cask tor-browser
Error: Failure while executing; `/usr/bin/sudo -E -- /bin/cp -pR /opt/homebrew/Caskroom/tor-browser/14.5.5/Tor\ Browser.app /Applications/Tor\ Browser.app` exited with 1. Here's the output:
john is not in the sudoers file.
This incident has been reported to the administrator.
 
  • Like
Reactions: Quotenfrau
However, a non-admin account won't be able to write to /Applications or /opt. I also don't think a non-admin account can disable Gatekeeper when that is required.

Thanks for the hints. It's working so far:

Code:
cat brew.env
HOMEBREW_CASK_OPTS=--no-quarantine --appdir=/Users/quotenfrau/Applications
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.