2

I updated an old centrino-notebook after Ubuntu 9.10 with 12.04 - now sudo seem to be broken, because after sudo <whatever> I get the error message:

sudo: unable to initialize PAM: No such file or directory

In /var/log there seem to be no pam*.log file any more.

I cannot use sudo command for to change permissions of /etc files.

Radu Rădeanu
  • 169,590
dschinn1001
  • 3,829
  • I don't recognise pam*.log, but try /var/log/auth.log for more information on what's going on. It looks like some PAM package or other has failed to upgrade; the best way to fix this will involve booting in single-user mode. – Darael May 21 '13 at 15:18
  • update the result > ls /etc/pam.d/ – Qasim May 21 '13 at 15:46
  • You may have to do a password recovery.... If this was a fresh install of 12.04, you might want to try again. – belacqua May 21 '13 at 16:50

1 Answers1

2

Create a file /etc/pam.d/common-session-noninteractive and copy paste the following lines in it

 pkexec nano /etc/pam.d/common-session-noninteractive

Copy & Paste the following lines

 session        [default=1]                     pam_permit.so
 session        requisite                       pam_deny.so
 session        required                        pam_permit.so
 session        required                        pam_unix.so

Save & Exit

Source

Qasim
  • 22,092