Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just upgraded to Kubuntu 12.04 from 11.10.

Now when I use sudo I almost always get:

sudo: pam_mount.c:417: modify_pm_count: Assertion `user != ((void *)0)' failed.

It makes the command fail.

What is up with that and how can I fix it?

share|improve this question
up vote 2 down vote accepted

Login with a root account with sudo bash. You can also do this from a live CD. Or you need to reboot and do issue a sudo bash with the 1st command (it looks like this bug only shows up after the 2nd time you use sudo).

sudo gedit /etc/pam.d/common-session-noninteractive

look for line 16(ish) and change




Try a command with sudo and it should work as normal.

Source from launchpad

share|improve this answer

This misbehavior is caused by a bug in "sudo" package. The above mentioned fix is unfortunately just a workaround that causes pam_denied to run so all authorizations fail and Cron jobs are no longer executed. Syslog for instance states:

'CRON[process id]: Permission denied'.

A patched "sudo" package is available on the following PPA:

However please note that despite TJ's reputation "sudo" is quite a sensitive package on our Ubuntu system and I advise against installing versions provided by non official Ubuntu or Debian parties.

In any case this bug is referenced by launchpad bug #927828 and triaged as "High importance". Thus a bugfix is likely to be released soon after LTS12.04 has been launched.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.