I accidentally command the root admin and sudo in sudo visduo
file.
Now with current user it is not rolling it back because I can't access it any more.
File does not get opened with command sudo visudo
It says: user is not in sudoers file.
While if I access it by nano /etc/sudoers
It says permission denied when I try to save the file again.
$sudo cat /etc/sudoers
...
# User privilege Information
#root ALL=(ALL) ALL
#...
#%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d
#Members of the admin group may gain root privileges
#%admin ALL=(ALL) ALL
#
sudo
. Just runvisudo
normally. Or, evenvi /etc/sudoers
. If you messed up permissions, usechmod 660 /etc/sudoers
first.