Discussion:
Multiple passwords for a user (SQL)
Marco Fretz
2014-10-06 09:01:40 UTC
Permalink
Hi everyone,

I'm not sure if this has been discuessed already as I coun't find
anything in the archives - maybe I'm looking for the wrong thing.

I want to build something similar to googles "app passwords" where your
use a different password (strong, auto generated) for each device / app.
In general I think this is pretty easy on the database side as I just
need a password table and link say the passwords with an user_id to the
corresponding user in the users table - one use has many passwords (1:n).
for dovecot this means that it will get multiple rows with passwords
back from the "password_query". is there a way to tell dovecot to check
all those returned passwords and "pass" the request if one of those
passwords match?

thank you,
best regards
Marco
Steffen Kaiser
2014-10-06 11:52:07 UTC
Permalink
Post by Marco Fretz
corresponding user in the users table - one use has many passwords (1:n).
for dovecot this means that it will get multiple rows with passwords
back from the "password_query". is there a way to tell dovecot to check
all those returned passwords and "pass" the request if one of those
passwords match?
I think no, but you could craft a PAM module and use the pam passdb or
supply a checkpassword script:

http://wiki2.dovecot.org/PasswordDatabase

- --
Steffen Kaiser
Marco Fretz
2014-10-06 14:46:21 UTC
Permalink
Thank you Steffen,

This sounds like a plan. checkpassword looks quite simple to use and I
could still use default userdb with dovecot-sql for userhome, quota, etc.
I'll give this a try.

thanks
Marco
Post by Steffen Kaiser
Post by Marco Fretz
corresponding user in the users table - one use has many passwords (1:n).
for dovecot this means that it will get multiple rows with passwords
back from the "password_query". is there a way to tell dovecot to check
all those returned passwords and "pass" the request if one of those
passwords match?
I think no, but you could craft a PAM module and use the pam passdb or
http://wiki2.dovecot.org/PasswordDatabase
-- Steffen Kaiser
Loading...