Fedora kicked me out of Sudoers

I installed Fedora workstation yesterday and it wasworking fine till this morning but I can not use sudo anymore for reason I dont know. Since yesterday I have only done few things - installed vscode , vim , python, setup my accounts and upgrade the system. I was able to use sudo after the update.
I tried becoming root and adding myself back to the file but when I enter root password I get authentication failure.

It just takes a moment’s googlemancy to learn how to reset the root password, so I’m not putting it here where it’s too easy to find. Once you’ve done that you can fix your sudo permissions, although as you have the root password, there’s no reason to use sudo. I’ve been using Linux for over twenty years, and never bother putting myself into the wheel group because I always have root whenever I need it.

Hi Pratham - here’s the link that I believe Joe was referring to on how to reset your root password:

And take it for what it’s worth, but there do seem to be a decent number of arguments for continuing to use sudo instead of logging in as root, some summaries of which could be found in this linked comment:

1 Like

I hope you know that with sudo you need to provide your own password and not the root password.

Can you post the commands you ran to do this? If you change your group memberships (e.g. run usermod -g instead of usermod -Ag), this will take effect when you next log in, so you will still be in the wheel group after you change your group membership, but not after you log in again.

1 Like

Who said anything about logging in as root? The various incantations of su do everything you need, so why not just open a terminal and use su if you need root access?