password change webapp not working

  • Hi,

    I’m trying to get the passwd plugin to work, but am unable to get it to work.

    I’ve tried several versions of the plugin:
    None of them work on our internal DB install, when applying the password change, we get a internal server error on the page. The apache error log states:
    [Mon Sep 16 16:36:06.066415 2019] [php7:error] [pid 5414] [client [–]:48722] PHP Fatal error: Uncaught Error: Call to undefined function mapi_zarafa_setuser() in /usr/share/kopano-webapp/plugins/passwd/php/class.passwdmodule.php:228\nStack trace:\n#0 /usr/share/kopano-webapp/plugins/passwd/php/class.passwdmodule.php(67): PasswdModule->saveInDB(Array)\n#1 /usr/share/kopano-webapp/plugins/passwd/php/class.passwdmodule.php(20): PasswdModule->save(Array)\n#2 /usr/share/kopano-webapp/server/includes/core/class.jsonrequest.php(57): PasswdModule->execute()\n#3 /usr/share/kopano-webapp/kopano.php(145): JSONRequest->execute(’{“zarafa”:{"pas…’)\n#4 {main}\n thrown in /usr/share/kopano-webapp/plugins/passwd/php/class.passwdmodule.php on line 228, referer: https://[—]

    any ideas on what I’m missing here?

    Using kopano On ubuntu 18.04, mariadb php 7

  • Kopano

    This plugin is not maintained by Kopano so you should raise those questions to the owner of this plugin.

  • Ok, I get that.

    but isn’t there another way of changing the password through the webapp interface. Other than through an external plugin?

  • I have the password plugin working on Kopano but I am sure it is an old version that I have hacked some times ago by changing some of the functions from zarafa to kopano.

    I tried later on to upgrade to the later versions and never succeeded.

    If you PM I can try sending you the files I have.

  • @allthesenames

    And yes, I do think that having a standard kopano approved plugin for changing the password from the front end would be great, because if all you use is the standard setup of Kopano, there is no way to change the password from the front end.

  • Kopano


    You could make a PR to make the plugin up to date.
    Or fork it…

  • Hallo

    i know the topic is a bit older but i found out today that version 1.3 works.
    But I only use DB, no LDAP!
    The kopano server log and mariad db log is clean ;)
    Maybe it helps someone

    Kopano Core:8.7.12

  • @Sinux

    I tried every version, none work.

  • ok, on my System,

    Kopano Core:8.7.12 no community or beta Versions…

    i used only the DB auth from silentsakky not dducret fork!

  • @allthesenames have you had a look inside php error log? If nothing mentioned in there what could give you a clue, please try to have a look inside the php/class.passwdmodule.php file. Try to put in error_log statements that will write in file so that you can narrow the line where the problem occurs.

    If using LDAP please have especially a look on how connection to LDAP is being established and if user is having all necessary rights to change his own password…

    If using AD please have a look that the path in config.php to ktpasswd binary is correct and web server is allowed to execute the binary (check i.e. open_basedir restriction)

    Best regards


  • I’ve looked into the php error logs, that’s where the original error quote came from.

    PHP cannot find the function mapi_zarafa_setuser()

    which is correct, this function isn’t defined anywhere in the webapp source code.

    webapp: 4.0.2678
    z-push: 2.5.2

  • @allthesenames
    Interesting. I’ve greped through whole of my passwd plugin that is working at my WebApp - I actually did not find this function being called in my passwd Plugin…


  • Now that’s weird,
    This is what I get:

    grep -r mapi_zara
    php/class.passwdmodule.php:                     $userinfo = mapi_zarafa_getuser_by_name($store, $userName);
    php/class.passwdmodule.php:                     if (mapi_zarafa_setuser($store, $userinfo['userid'], $userName, $userinfo['fullname'], $userinfo['emailaddress'], $newPassword, 0, $userinfo['admin'])) {

    Both true for my installed version, and the one sinux linked:

    which one are you using then?

  • @allthesenames

    Looks for me that someone tried to avoid zarafa-passwd/kopano-passwd usage by internal functions. Maybe the functions do not publicy exists or being used wrong way (sorry no time to check API Library now). In file I’ve send you by chat link you will not find them. - Actually because I’m using “My Version” that is based on Silentsakky Version but got changed in past since issues with Zarafa->Kopano WebApp change and some other things that asked to get adapted to have it working again…

  • Dear allthesenames,

    have you been able to get it running? I have the same issues as you on my server.
    So i would be glad if someone might be able to post the solution :)

    Thanks in advance.

Log in to reply