Ubuntu: Sudo command broken [duplicate]



Question:

This question already has an answer here:

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.


Solution: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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »