You are not logged in.
I realized that I was not able to install certain packages without becoming the root user on my machine. After a brief investigation I found that the command
wheel ALL=(ALL) ALL
lines in my /etc/sudoer file was not un-commented. I used the visudo command and uncommented it in the vim editor. However, after doing so it appears that I unadded my username from the file because now I cannot use the sudo command without getting the following error.
username is not in the sudoers file. This incident will be reported
How do I add my username back to the sudoers file? [SOLVED]
Last edited by webbja123 (2021-04-13 13:10:26)
Offline
More exactly, you are not in the wheel group, you must add your user to the wheel group using usermod.
Something like:
# usermod -a -G wheel your_username_here
Offline
I already tried that and it did not fix the issue, which surprised me!
Offline
Did you re-login?
Post output of the command groups and the contents of sudoers...
Offline
%wheel ALL=(ALL) ALL
However I'm not sure how the entire scenario adds up:
I was not able to install certain packages without becoming the root user
You're not able to install any packages w/o root permissions.
now I cannot use the sudo command without getting the following error
This seems to imply that the user previously was added to the sudoers and you could sudo - in which case even adding the wheel *group* (the "%") to the sudoers and yourself to the wheel group wouldn't have made any difference to begin with?
Post … the contents of sudoers
Yes, please.
I think you "uncommented" the wheel group by removing the "%" (what turned the group into a user - not yours) but there's also a chance that you ran into this meme:
Online
That was the issue. I accidentally deleted the % symbol with the # symbol in front of wheel. Unfortunately that has revealed another issue, but I will create another post to describe that. Thank you.
Offline