Closed iapyeh closed 3 years ago
If step 2 affected your ability to sudo, then either you didn't edit /etc/pam.d/sshd
(maybe common-auth
?), or something is seriously wrong with your PAM config unrelated to this PAM module.
Too late now, but for the future: While editing PAM configs, always keep a root shell open as a fallback.
If you have the root password maybe you can run su
. If not, then regaining root is more of a Linux support question than about this PAM module.
I am lucky, that I solved this problem by:
vi /etc/pam.d/sshd
, adding "nullok" to let it be "auth required pam_google_authenticator.so nullok".Well, what I learned is that, on my server (OS:Debian GNU/Linux 10 (buster)). This command: "sudo apt-get install libpam-google-authenticator" simply enables this feature in one step.
Uh, that doesn't sound right. I run Debian and I've never encountered this. Can you grep /etc/pam.d/*
for google
?
I read from someone's article, roughly speaking, there are 4 steps for installation:
I have completed step1 and 2. Then, I can not move to step3. Because I am not able to "sudo" any more. All sudoers on system are all failed to sudo. I am sure all passwords are correct. I have no idea where it goes wrong.
I am appreciating your kindly suggestions.