I was working on password policy and set these values according to benchmark
I edit the /etc/pam.d/common-auth configuration file and add or modify the pam_tally2.so or pam_faillock.so lines as appropriate:
auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900
auth required pam_faillock.so preauth audit silent deny=5 unlock_time=900
auth sufficient pam_unix.so
auth [default=die] pam_faillock.so authfail audit deny=5 unlock_time=900
auth sufficient pam_faillock.so authsucc audit deny=5 unlock_time=900
after changes in /etc/pam.d/common-auth
I'm unable to log in to my ubuntu machine it said "incorrect password"
if anyone know How I can reset my password please let me know I will be very thankful to you .
Note: I tried common solution on google they are not working in my case
You can use a USB drive with an Ubuntu (for example) ISO to reset your password.
BE VERY CAREFUL : mistakes could lead to data loss
The main steps are :
Booting from the USB drive (access the BIOS settings to do so, you might need to disable Secure Boot) and select "Try Ubuntu"
Mount your system partition (use
lsblkto find it):Mount some necessary directories and chroot into your system
Reset you password (you can also edit the
/etc/pam.d/common-authconfiguration file to revert your changes)Type
exitto exit the chroot environment and umount the partitionsReboot and remove the USB drive, connect with your new password