Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 12048  / 1 Year ago, wed, may 31, 2023, 2:34:32

I've installed a Ubuntu 22.04 VM on my windows computer (using virtual box), and whenever I use the sudo command on the unique, default session, I get the error "user not in sudoers file". How can I fix this ? I have tried to run the recovery mode in root mode, but I'm asked a password (which I never defined nor was given).
Isn't it weird that the default session doesn't have admin permissions ? I'm guessing this isn't usually the case, but it's been like this on every ubuntu vm I've created.


Any help will be greatly appreciated, thank you !


More From » permissions

 Answers
2

All you need is to add your user to the sudo group. There is no reason to modify the /etc/sudoers file.


su -
usermod -a -G sudo vboxuser

Then log out and back in for changes to take effect.


[#148] Thursday, June 1, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
igeonlothe

Total Points: 370
Total Questions: 121
Total Answers: 114

Location: United States Minor Outlying Island
Member since Fri, Feb 5, 2021
3 Years ago
igeonlothe questions
;