'sudo' command is broken

12,876

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

Share:
12,876

Related videos on Youtube

dschinn1001
Author by

dschinn1001

" Philosophy is, when somebody searches a black cat inside a black tube, but this cat is not there. Religion is, when one screams: ' I have her ! ' " (anonymous) " The mind is limited. The world is incredible. or: The world is limited. The mind is incredible ? " (insight) "True - if you know how to encrypt fool-proof - then you risk, that your datas are copied fool-proof." (Roger Signwood) To my person and my attitude: Yes - I am deaf - more I am stone-deaf, but not "stoned". In principle I don't vote down other Ubuntu - Users, I only vote up them, when ever there is a good reason for that. Or I remain neutral. This because voting down somebody is somehow antique - like to hold the thumb down as Roman towards the Gladiators - so voting down somebody is old-fashioned in my view. "The more points one has, then the more FAT one has." Partially autistic.

Updated on September 18, 2022

Comments

  • dschinn1001
    dschinn1001 over 1 year

    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.

    • Darael
      Darael almost 11 years
      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.
    • Qasim
      Qasim almost 11 years
      update the result > ls /etc/pam.d/
    • belacqua
      belacqua almost 11 years
      You may have to do a password recovery.... If this was a fresh install of 12.04, you might want to try again.
  • dschinn1001
    dschinn1001 almost 11 years
    thanks for quick answer. I knew that in /etc is to create the file common-session-noninteractive but I cannot get into single-user-mode with shift-key ? shift-key is "dead" on this installation ?
  • dschinn1001
    dschinn1001 almost 11 years
    /etc - files can be created or modified only as root or as sudo, but I am excluded from sudo ...
  • Qasim
    Qasim almost 11 years
    try with pkexec
  • dschinn1001
    dschinn1001 almost 11 years
    apparently package-failure while update from 9.10 to 12.04 - so need simply to reinstall ... but how ?
  • Qasim
    Qasim almost 11 years
    boot with live cd and make a file
  • dschinn1001
    dschinn1001 almost 11 years
    true - how comes this lacking thought ... ? :-P thx.