SQLite user database

Lev leventelist at gmail.com
Sat Jul 15 17:05:18 EEST 2017


On Fri, 14 Jul 2017 13:46:01 -0700 (PDT)
Joseph Tam <jtam.home at gmail.com> wrote:

> > I continuously get user authentication errors. I suspect that the
> > problem is with a password hashing. I used
> >
> > # doveadm pw -s SHA512-CRYPT
> > Enter new password:
> > Retype new password:
> > {SHA512-CRYPT}$6$1cCNWIMCTpuqmexO$cCq7nDEga1xza3967nZ.BFZaGWNoYwjnNfSCvZE/jGzYAY1hLWE1iHR1KYaO.mvVE4WVdDSrvPNtfwAUn/yk3/  
> 
> Looks OK.
> 
> > I have this at the database:
> >  
> > sqlite> SELECT * from users;  
> > lev|logonex.eu|$6$1cCNWIMCTpuqmexO$cCq7nDEga1xza3967nZ.BFZaGWNoYwjnNfSCvZE/jGzYAY1hLWE1iHR1KYaO.mvVE4WVdDSrvPNtfwAUn/yk3/|/home/lev|1001|1001  
> 
> I'm not too hip about SQLite and schemas so I don't know about all
> the other fields you have and whether you're parsing it correctly.
> Need doveconf -n to see your SQL query.
> 
> > I've tried adding this to the database, but still no luck. :-(
> > {SHA512-CRYPT}$6$kbUEfz/Mcgpctv/s$uNQGOL/2F01Br.vx0twozVi6v.KJAHZV0OQ7yOFwD9YCloh7UJmeFe7WrgUez9Q5xXdrNOU5q9H8fE3FU2ok9.  
> 
> How does it relate to the previous hash?  Same password but another
> salt and prepended with {SHA512-CRYPT}?

Yes, that was a bit odd. Same password, different hash. Even with verify tool, there was mismatch. So I decided to go for SHA512, without encryption.

> > The other thing I want to avoid is the home directory and UID and
> > GID. Is there any way for dovecot to use logical, non UNIX users so
> > there's no need to have a user database and an sqlite database?  
> 
> Yes, you want a virtual user setup.
> 
>  	https://wiki.dovecot.org/VirtualUsers
> 
> You still need a user/password database of some sort unless you're
> contemtemplating some wild free-for-all access with a single shared
> password.

Thanks, I did that, and it works.

The problem was that in the client I only added 'myuser' as username,
but I shall use 'myuser at mydomain.TLD'. With that, it works.

Thank you very much for your reply!

Levente



More information about the dovecot mailing list