question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Epic: `sudo` handling on macOS

See original GitHub issue

This is an extended version of #1127:

We have 3 different levels of users:

  1. Regular users without access to sudo (or don’t want to use it)
  2. Users with sudo access requiring a password
  3. Users with password-less sudo by default

sudo is required for the following operations:

  • install vmnet related binaries into /opt/rancher-desktop
  • create /etc/sudoers.d/rancher-desktop-lima
  • start lima instance using a vmnet instance
  • overwrite /var/run/docker.sock
  • create symlinks in /usr/local/bin (see #1155)

Right now setting up and using vmnet is not optional, so it is impossible to run Rancher Desktop at all without sudo.

Tasks:

  • #1700
  • Run in reduced functionality mode when sudo is unavailable
  • #1225
  • Replace use of sudo in code with a setuid helper process
    • This will reduce the frequency of prompts (to once per RD version)
    • For macOS, we may need to see if SMJobBless is a better fit.
    • Ship separate admin-installable package for setuid helper
      • This is to support scenarios where the admin can install things system-wide, but not modify the user configuration.
    • Figure out self-updating of setuid helper
      • Will probably require checking code signing; check if this works with out signing setup
      • Will need to do something for Linux (where there’s no standard code signing beyond the whole package).
  • Verify that RD works when installed into $HOME/Applications
  • #1128

Related issues:

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:11
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
pboushycommented, Feb 18, 2022

sudo is required for the following operations:

  • install vmnet related binaries into /opt/rancher-desktop
  • create /etc/sudoers.d/rancher-desktop-lima
  • start lima instance using a vmnet instance
  • overwrite /var/run/docker.sock
  • create symlinks in /usr/local/bin

I’m the Mac enterprise administrator for my company, and looking at Rancher Desktop to replace Docker Desktop on a few hundred systems. Here’s my preferred mechanism for most of this:

It would be ideal for these items to be rolled up into a PKG, that either Rancher Desktop installs when it doesn’t detect them (if user is admin) OR that an admin can install as part of providing Rancher Desktop to non-admins.

As Mac Admins, we use tools like Jamf Pro, VMWare’s Workspace One, or Munki to provide software to our employees. Those tools have the ability to deploy Rancher Desktop, and immediately following install the “support utilities PKG” This would also allow mass deployment with minimal config required from developers.

0reactions
janduboiscommented, Mar 15, 2022

@pboushy offered on Slack:

I build alot of scripts and stuff to generate PKGs for custom packages we have. Let me know if there’s anything I can do to help y’all with that. I also have some experience with privileged helpers that would allow a normal user to run Rancher Desktop and Rancher Desktop create those items.

cc/ @mook-as

Read more comments on GitHub >

github_iconTop Results From Across the Web

Root Access Sudo Bug Found to Affect macOS Big Sur
A sudo bug that can grant an attacker root access has been discovered to affect macOS Big Sur (via ZDNet). The security vulnerability ......
Read more >
Demystifying `root` on macOS, Part 2 — The `sudo` Command
sudo allows a user to execute a command with super user privileges, without needing to authenticate as the super user. The user has...
Read more >
Install GitLab Runner on macOS
Two methods for installing GitLab Runner on macOS are available: Manual installation. ... sudo curl --output /usr/local/bin/gitlab-runner ...
Read more >
DP-01: Not enough permissions - Epic Games Store Support
This error indicates that you do not have permission to install the game. Try the steps listed below to resolve this. These steps...
Read more >
sudo Man Page - macOS - SS64.com
-- The -- flag indicates that sudo should stop processing command line arguments. It is most useful in conjunction with the -s flag....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found