13 Jul 2010
How to stop Ubuntu from asking for SUDO and SU password
To stop Ubuntu from asking for sudo password, you only need to change a content in the pam settings.
This is what happened today. Ubuntu didn’t ask me a for SUDO and SU password. I tried to execute “sudo passwd” or “passwd username”. No password asked. Weird.
I’ve checked /etc/sudoers – looks OK.
Tried sudo -K, no effect. Created a new user “guest” and assigned it to the “admin” group. Same. No password required.
Finally, i’ve figured it out. The problem was in the pam settings.
The file /etc/pam.d/common-auth contained a line
auth [default=1] pam_permit.so
when it should be something like
auth [success=1 default=ignore] pam_unix.so nullok_secure
This is serious security flaw.

