Broke my Sudo authentication... How to fix?

daguilar

New Member
Credits
21
Hello,

I have been trying to get my fingerprint scanner to work on Pop Os (The default fingerprint software wasn't working) and I was following a guide online...

So i added fprintd to my linux and used sudo nano to edit the following files:

/etc/pam.d/system-local-login
/etc/pam.d/login
/etc/pam.d/su
/etc/pam.d/sudo
/etc/pam.d/gdm
/etc/pam.d/lightdm
/etc/pam.d/polkit-1

All I did was add a couple lines:
auth sufficient pam_fprintd.so
auth include system-login

and now I can't login to sudo with password OR fingerprint...
 

Attachments



Jared.

Member
Credits
517
I might be wrong in my explanation because I can't remmeber how PopOS preconfigures their systems but you can try logging in as a root user. Enter tty by pressing Ctrl + Alt + F3. Once there you would be signed as your home user. Enter the command exit to logout of said user. Next when prompting for a user name enter root and the password you have used to login to your system. Then remove the two lines you had included with a CLI text editor, whether it be vim, nano or emacs. If all goes well, you should he able to regain access to sudo.
 

daguilar

New Member
Credits
21
I might be wrong in my explanation because I can't remmeber how PopOS preconfigures their systems but you can try logging in as a root user. Enter tty by pressing Ctrl + Alt + F3. Once there you would be signed as your home user. Enter the command exit to logout of said user. Next when prompting for a user name enter root and the password you have used to login to your system. Then remove the two lines you had included with a CLI text editor, whether it be vim, nano or emacs. If all goes well, you should he able to regain access to sudo.
Thank you for replying... I have tried this and was unsuccessful when trying the command exit at tty. I also tried logging in as root there and wasn't successful.
 

Jared.

Member
Credits
517
Thank you for replying... I have tried this and was unsuccessful when trying the command exit at tty. I also tried logging in as root there and wasn't successful.
Have you used timeshift or formatted the drive in the btrfs file system? That way you could go back to a previous "snapshot" of when it was working.
Here is another solution, try running the command pkexec along with a CLI text editor. pkexec can be used instead of sudo for non-graphical applications. To can use that command to delete the two lines you had included.

Also if you are getting an authentication error message from using the command echo $$ to get its PID then once obtained enter it through this command pkttyagent --process PID_Number. Use these commands, if it produces an error.
 

Condobloke

Well-Known Member
Credits
7,690
If all that has not worked.....

Reinstall.

Quick, Simple, and it works

Use Timeshift as soon as you have installed. Take a snapshot, saved to an external hard drive.
Then take a fresh snapshot each fortnight, and at the end of each month delete 1 of them.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
12,437
If you don't know the root password to remove those two lines which you added which broke your sudo authentication, you can just boot in recovery mode to reset your root password and to remove the two lines that broke your sudo authentication.
 

Top