Managed to Lock out my account from root
by jasric from LinuxQuestions.org on (#5QA90)
Hi
I recently installed Linux Mint 20.2 on my system. All was going well and I setup a samba share and added my account into a group that I use to access the samba share. Later on I restarted my Linux Mint system and now I seem to be removed from the root/sudoers group.
I don't have any other accounts with root access on the system and when I try and run sudo usermod -aG sudo <my username> I get the following error: Sorry, user <USERNAME> is not allowed to execute '/usr/sbin/usermod -aG sudo <USERNAME>' as root on linuxmint.
Also when I try and see if their are any lock files to delete I get the same sort of error.
When I try to elevate as root I get the same error. even if I run sudo -i same error.
How do I get my access back, and myself added back to sudoers group please? I really don't want to re-install my system.
Thanks
jasric
I recently installed Linux Mint 20.2 on my system. All was going well and I setup a samba share and added my account into a group that I use to access the samba share. Later on I restarted my Linux Mint system and now I seem to be removed from the root/sudoers group.
I don't have any other accounts with root access on the system and when I try and run sudo usermod -aG sudo <my username> I get the following error: Sorry, user <USERNAME> is not allowed to execute '/usr/sbin/usermod -aG sudo <USERNAME>' as root on linuxmint.
Also when I try and see if their are any lock files to delete I get the same sort of error.
When I try to elevate as root I get the same error. even if I run sudo -i same error.
How do I get my access back, and myself added back to sudoers group please? I really don't want to re-install my system.
Thanks
jasric