Sudo
- include your user in the sudo group
#su - usermod -aG sudo ralph
- list the groups
# groups pi pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi
- remove sudo (or unwanted groups) by not listing after usermod -G
usermod -G pi,video,plugdev,users,input,netdev,gpio,i2c,spi,adm,dialout,audio pi
- check
# groups pi pi adm dialout cdrom audio video plugdev games users input netdev gpio i2c spi
hardening
On the raspberry pi sudoers are added to the /etc/sudoers.d and must be deleted along with 010_pi_nopasswd file
delgroup pi sudo rm /etc/sudoers.d/010_pi_nopasswd rm /etc/sudoers.d/pi