sudo and authentication: pam_unix(sudo:auth): auth could not identify password for [bilal]

Asked by Musashi

0

I am experiencing an issue regarding sudo. I wanted to make an email alert for bad login in Ubuntu. so, when I updated file with gedit /etc/pam.d/common-auth by adding these lines :

auth [default=ignore] pam_exec.so
set uid /usr/bin/report_badlogin
before auth requisite pam_deny.so

and saved it. Now when I run sudo it does not accept my password. I tried to edit this file but can't do it successfully with root access and can't switch there without authentication.

Here on logs I get issue: : auth could not identify password for [use

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Please close as spam

Revision history for this message
Musashi (mush318) said :
#2

With all due respect sir, @actionparsnip what the hell is this? I am potentially screwed here and here I am looking for your and other respected member's assistance. If you can't answer please let it go and let other person help it.

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#3

Please excuse actionparsnip's wrong remark. Launchpad currently is hit by a wave of spams, and apparently he marked your valid question wrongly as spam.

For your problem:
I suggest that you undo your change in the sudoers file by rebooting in recovery mode - root command prompt.

See https://www.psychocats.net/ubuntu/resetpassword how to start that mode.
After the remount command you probably have to execute "sudo nano /etc/sudoers" and undo your changes (or restore a backup version of the status before your modification).

Advice for the future:
Whenever you do such change that might affect running sudo, you should open another terminal window and execute "sudo -i" before the change. If something goes wrong you have that second window open with admin rights to repair.

Revision history for this message
Musashi (mush318) said :
#4

Thank you Sir, (m-hampl) you assistance really solved my issue. and pardon my for my previous behavior, I was just frustrated. I hope you understand!

Revision history for this message
Musashi (mush318) said :
#5

problem solved!

Revision history for this message
Musashi (mush318) said :
#6

Thanks Manfred Hampl, that solved my question.