sudoers file doesn't work if the user is not a member of the `staff` group
See original GitHub issueRancher Desktop Version
0.7.1
Rancher Desktop K8s Version
0.22.5
What operating system are you using?
macOS
Operating System / Build Version
macOS Monterey 12.1
What CPU architecture are you using?
x64
Windows User Only
No response
Actual Behavior
Cannot start rancher desktop (Tried factory reset, fresh install)
Steps to Reproduce
Open Rancher Desktop
Result
Error occurs
Expected Behavior
It should start normally
Additional Information
time="2021-12-22T09:24:13-03:00" level=fatal msg="failed to run [sudo --user root --group wheel --non-interactive /bin/mkdir -m 775 -p /private/var/run/rancher-desktop-lima]: stdout=\"\", stderr=\"sudo: a password is required\\n\": exit status 1"
2021-12-22T12:24:13.011Z: + limactl start --tty=false 0
2021-12-22T12:24:13.011Z: Error: /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl exited with code 1
2021-12-22T12:24:13.011Z: Error starting lima: Error: /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl exited with code 1
at ChildProcess.<anonymous> (/Applications/Rancher Desktop.app/Contents/Resources/app.asar/dist/app/background.js:1:8218)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:38 (12 by maintainers)
Top Results From Across the Web
How to Fix "Username is not in the sudoers file. This incident ...
The /etc/sudoers file was altered to prevent users in sudo or admin group from elevating their privileges to that of root using sudo...
Read more >"user is not in the sudoers file. this incident will be reported ...
The solution for this was simply to add my user to the sudo group using #adduser username sudo . So, if you ever...
Read more >Username is not in the sudoers file. This incident will be reported
Open another terminal window. Step 9. Try any sudo command to check if your username is correctly added to sudoers file. I used...
Read more >Linux: 'Username' is not in the sudoers file. This incident will ...
If you get an error saying user is not in the sudoers file, it means that the user doesn't have sudo privileges yet....
Read more >'user is not in the sudoers file' but actually is
Have you tried creating a new user and adding that user to the sudo group, to see if that works? This may help...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem here seems to be that the sudoers file installed by Rancher Desktop assumes that the current user is a member of the group ‘staff’. This was not the case for my user. After adding my user to the staff group, i.e.
Rancher Desktop seems to start up normally in 0.7.1
First you should verify that you are indeed a member of the
everyone
group:Factory reset is not necessary, but won’t hurt. But you have to stop RD.
Yes
Should not be necessary because it will be overwritten in the next step.
This should again ask you for your password, so it can regenerate the sudoers file with the new content, and then I hope it will all work.