anybody run into unable to initialize PAM?

jwojda
Valued Contributor II

Why I try to push software to this box, I get the following from C.Remote...

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

any ideas?

2 REPLIES 2

NoahRJ
Contributor II

Have you tried turning her off and back on again?

NoahRJ
Contributor II

Actually, though, it sounds like something broke with sudo. You'll probably have to get physical access to the machine and boot it up in single-user mode to modify the proper files without sudo access, but if you have a root account already enabled, you can maybe SSH into the machine and poke around there.

Once you get into the machine, hop into /var/log and then run ```
grep pam *.log
``` to find the log that contains the PAM error, which should tell you which configuration file is missing or corrupt. Otherwise, you might be able to cd into /etc/pam.d/ and see if any of these files are missing from the machine:

chkpasswd   login       passwd      screensaver sudo
cups        login.term  rshd        sshd
ftpd        other       samba       su

Since you're seeing the authentication module error with sudo, you might be able to just create the ASCII text file from scratch. Below is what the file contains on my machine, so if you copy that direct, that could do the trick. Otherwise, if the logs reveal it's a different configuration that's causing issues, you can find what the text looks like on a good machine and copy it over from there.

# sudo: auth account password session
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so

Hope this helps!