LDAP lack, so how to export users stuff to openldap ?

Discussion in 'Developers' Forum' started by ledufakademy, Aug 6, 2020.

  1. ledufakademy

    ledufakademy Member

    We need sso for all kind of webapp.
    I want build read only openldap.
    So i need to know how to export :
    Users data, password, group ...
    Outside of ispconfig.
    How can i do that ?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Either you access the ispconfig database with your export script directly or you use the ISPConfig remote API to query for the data that you want to export.
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    A 3rd option would be to create a server plugin that acts on insert/update/delete of the ISPConfig entities and propogates that to your ldap server. You could perform a Resync of whatever you're copying (clients? mailboxes?) to load the ldap server with everything currently in ISPConfig.
    till likes this.
  4. ledufakademy

    ledufakademy Member

    i don't know api or resync ... but i just want to add the possibilities to export via script , crontab export, mailbox data : Name, mail,password,Enable receiving, Disable SMTP fields to a txt file.
    then import it in ldap server.
  5. nhybgtvfr

    nhybgtvfr Active Member

    sounds like your simplest method then is just a mysql query on the master dbispconfig database with the output sent to a .csv or .txt file.
    if it's something you plan to export on a regular basis maybe once you've got the full query working as you need it, keep it as a stored procedure, then just call it anytime you need a new export file.
    ledufakademy likes this.
  6. ledufakademy

    ledufakademy Member

    i think i found the GOOD solution for all of us , i share :

    "import users from MySQL into your LDAP server, you are in the right place!"
  7. ledufakademy

    ledufakademy Member

    keycloak is also a good option but i need someone help me to developp the SPI (provider identity) for mariadb/ mysql like StrongDM, not free.
  8. ledufakademy

    ledufakademy Member

    where can i find the sql table schema(column, datatype etc) . of ISPconfig ?
    did i need particular code for extracting password ?(they need to be synchronize from mysql to openldap)
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    There is none, look at the database with phpmyadmin, the table names are fairly self explaining.

    Passwords are hashed in the same formats that are used in Linux /etc/shadow file.

Share This Page