user/password Authentication via Joomla database

Harald Leithner leithner at itronic.at
Thu Jul 5 18:37:44 EEST 2018


Hi,

this shouldn't be to hard.

Your dovecot-sql.conf.ext could look something like this:

---
driver = mysql
connect = host=<host> dbname=<dbname> user=<username> password=<password>

default_pass_scheme = BLF-CRYPT
password_query = \
  SELECT \
        u.username, \
        u.password, \
  FROM <JOOMLA_PREFIX>_users u \
        LEFT JOIN <JOOMLA_PREFIX>_user_usergroup_map g ON u.id = g.user_id \
  WHERE \
        u.username = '%u' AND u.block = 0 AND g.group_id = <ID OF THE
JOOMLA GROUP>

user_query = \
  SELECT \
        u.username, \
        u.password, \
  FROM <JOOMLA_PREFIX>_users u \
        LEFT JOIN <JOOMLA_PREFIX>_user_usergroup_map g ON u.id = g.user_id \
  WHERE \
        u.username = '%u' AND u.block = 0 AND g.group_id = <ID OF THE
JOOMLA GROUP>

iterate_query = SELECT username AS user FROM <JOOMLA_PREFIX>_users u \
        LEFT JOIN <JOOMLA_PREFIX>_user_usergroup_map g ON u.id = g.user_id \
  WHERE \
        u.block = 0 AND g.group_id = <ID OF THE JOOMLA GROUP>

---

But I'm not sure if dovecot supports Blowfish $2y$ Version used by
Joomla as default.

Also I didn't tested this configuration, so there maybe someflaws in it.

bye
Harald


Am 05.07.2018 um 16:05 schrieb Graham S. Jarvis:
> Hello,
> 
> did anyone ever set up Authentication via lookups to a Joomla (mysql)
> database?
> 
> What I'd like to do is lookup Joomla users (who are in specific/multiple
> groups) in the Joomla database and then fallback to /etc/passwd
> authentication to let system users authenticate.
> 
> I'm running :
> # 2.2.35 (b1cb664): /usr/local/etc/dovecot/dovecot.conf
> # OS: FreeBSD 11.1-RELEASE-p10 amd64
> 
> Thanks in advance,
> 
> -Graham-

-- 
Harald Leithner

ITronic
Wiedner Hauptstraße 120/5.1, 1050 Wien, Austria
Tel: +43-1-545 0 604
Mobil: +43-699-123 78 4 78
Mail: leithner at itronic.at | itronic.at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: OpenPGP digital signature
URL: <https://dovecot.org/pipermail/dovecot/attachments/20180705/05d9725d/attachment.sig>


More information about the dovecot mailing list