I haven't edited my sudoers, but I don't have to enter the password when running sudo
in the command line. I can run any sudo command without entering the password, by just opening the terminal, even after rebooting the system, how can I stop this?
uid=1000(ktcool) gid=1000(ktcool) groups=1000(ktcool),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare)
Best Answer
Use
visudo
to edit your sudoers file and look forNOPASSWD:
- that's the directive disabling the user password prompt (you NEVER have to enter the password of the target user, i.e. the root password). Simply removing that directive (including the colon at the end) should require you to re-enter your password to use sudo (unless you used it recently, then it's still cached, you can clear this usingsudo -k
)