Just installed a minimal ubuntu 12.04, then installed xfce4 and xinit from the command line after first boot. Totally vanilla installation afaik.
I'm noticing that sudo caches the password until I issue
sudo -k to clear it.
This is unexpected behavior in my mind. I've run xfce4 before and don't recall credential caching being on, nor have I experienced it in the many previous ubuntu installs I've had over the years.
Is this a new feature of Ubuntu? Is this something that's the result of the minimal install? Is this an xfce default that's been added recently?
It actually caches the right to elevate, but not your password, and has done so for quite a while. However, it does so for only fifteen minutes, by default. This is by design:
and as a note of security from man sudoers:
and from the same page:
As seen here, this behavior has persisted for a long time.
If you want to change this, use
visudoto set the