Creating two or more passwd for a single user

Is it possible settingup two or more passwd for a single local user account?

It is possible to create a user with two password simply as

say when user is tecmint

useradd -d /home/tecmint tecmint

and assign password say tecmint123

passwd tecmint

and then edit /etc/shadow to enter second password manually, simply as


Then try to login to the user tecmint using First_Password and you will suceed, then try login to user tecmint using Second_password and it will fail. The reason is the first is true only. If you change the occurance of these passwords in /etc/shadow file as


You can login using Second_Passowrd but not First_password. So everything boils down to “You may have several password for one user account but only the first password entry in /etc/shadow is true. Rest are Useless.” Hope it helps.

P.S: When logging into account, use real password and not Hash. When Editing/Updating /etc/shadow with new password, use Hash Value of Password and not real password.