Slow sudo on Ubuntu

Excessive delay after typing sudo?

Looks as though the optional is hanging not only sudo but other auth processes (eg roundcube/dovecot/imap).

From here by erikdhansen (

(Copied in case ubuntu reorganise their forums!)

"Re: SSH Login takes long time (no DNS Problem)
So I was having this same problem and it wasn't the DNS issue that everyone points to. It ended up being a problem with PAM.