Table of Contents

SQL configuration backends

There is 3 types of SQL configuration backends for LemonLDAP::NG :

Lemonldap-ng.ini parameters

To use a SQL backend, configure your lemonldap-ng.ini file (section configuration) :

Example for MySQL :

[configuration]
type = RDBI
dbiChain    = DBI:mysql:database=lemonldap-ng;host=1.2.3.4
dbiUser     = lemonldap
dbiPassword = password
; optional
dbiTable    = mytablename

Configure your SQL database

SQL configuration

RDBI

CREATE TABLE lmConfig (
    cfgNum INT(11) NOT NULL,
    FIELD VARCHAR(255) NOT NULL DEFAULT '',
    VALUE longblob,
    PRIMARY KEY (cfgNum,FIELD)
    );

CDBI

CREATE TABLE lmConfig (
    cfgNum INT NOT NULL PRIMARY KEY,
    DATA longblob
);

Grant LemonLDAP::NG access

You have to grant read/write access for the manager component. Other components needs just a read access. You can also use the same user for all.

You can use different dbiUser strings :
  • one with read/write rights for servers hosting the manager
  • one with just read rights for other servers

MySQL example (suppose that our servers are in 10.0.0.0/24 network):

GRANT SELECT,INSERT,UPDATE,LOCK TABLES ON lmConfig.*
  TO lemonldap-ng@manager.host IDENTIFIED BY 'mypassword';
GRANT SELECT ON lmConfig.*
  TO lemonldap-ng-USER@'10.0.0.%' IDENTIFIED BY 'myotherpassword';