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

Asked by Musashi on 2019-10-15


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]
set uid /usr/bin/report_badlogin
before auth requisite

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

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Manfred Hampl
Last query:
Last reply:

Please close as spam

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.

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

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!

Musashi (mush318) said : #5

problem solved!

Musashi (mush318) said : #6

Thanks Manfred Hampl, that solved my question.