Read it carefully though. If you remove a user on the system from the sudo group and you are that user and that was the only account on the system, you will not be able to re-enable it for sudo access because you will no longer have sudo privileges to do so. Nor will you be able to create a new user with sudo access for the same reasons.
In other words, you must always have the safety net of one user on the system who has root access and who never loses that privilege.
There sort-of isn't really any "root" user left these days in the desktop space: security theater and the very genuine problems of Windows have basically killed off the concept, so now everyone has more power than they should have half the time, but not enough the other half.
You're fighting the system. Give it up. It's a BAD system, but you still can't win. Work with it instead.
Create your "main user" as "admin" / etc. Create a different user to BE the user. Done. That meets all your goals, instantly, without any of this random hackery that's only going to break later.
su -
visudo -f /etc/sudoers.d/main-user
main-user ALL=(ALL) ALL, !/bin/su, !/usr/bin/su, !/usr/bin/sudo
Run Mate-Terminal:
Commands:
sudo su
sudo caja
sudo passwd
Mate-Terminal Output:
Sorry, user main-user is not allowed to execute '/bin/su' as root on blabla.
Sorry, user main-user is not allowed to execute '/usr/bin/caja' as root on blabla.
Sorry, user main-user is not allowed to execute '/usr/bin/passwd' as root on blabla.
If your "main-user" is the only user and if, while your "main-user" still had sudo privileges, you used it to remove its own sudo privileges, how do you get to re-add sudo privileges to that single "main-user", if ever the need arose to download software/perform updates/repairs on the system? Because, in order to add someone to the sudo group, the user doing so needs to have sudo privileges themselves.