Disable passwordless sudo

Raspberry OS allows to run sudo commands with no password. This could be a security issue if Raspberry Pi is globally accessible. In order to require password when executing sudo commands, either remove /etc/sudoers.d/010_pi-nopasswd completely, or edit it and replace NOPASSWD with PASSWD:

pi ALL=(ALL) PASSWD: ALL
Show Comments