1

I upgraded my dedicated server from ubuntu 11.1 to ubuntu 12.04. After the server upgrade says 'unable to initialize PAM: No such file or directory' when i am going to change the user to sudo. I got this solution which is saying to make the /etc/pam.d/common-session-noninteractive file manually.

But this thing cannot be done as i do not have the permission to change the super user. Can any one help on this.

Avinash Raj
  • 78,556
  • 1
    Try pkexec dpkg-reconfigure sudo. – Danatela Mar 24 '14 at 03:31
  • @Danatela, But it seems pkexec is not installed the system, I cannot install is without the super user permission. It's like a deadlock. – Manoj Lasantha Mar 24 '14 at 09:05
  • No, just hold [Shift] during a boot, select recovery mode and drop to a root shell with networking. See the provided link for more detailed instruction. – Danatela Mar 24 '14 at 09:09

1 Answers1

1

If the provided solution seems too complicated, there is another way:

  • Reboot the computer
  • Hold Shift during the boot
  • In the GRUB menu, choose `<your Ubuntu version> - recovery mode
  • Select Remount filesystem read/write
  • Choose Drop to root shell
  • Enter nano /etc/pam.d/common-session-noninteractive or vim /etc/pam.d/common-session-noninteractive

And you can always fix everything by booting from LiveCD/LiveUSB, unless you've encrypted your system.

Danatela
  • 13,243
  • 11
  • 45
  • 72