13

I have installed LDAP and phpLDAPadmin on my Ubuntu 14.04 (Trusty Tahr). It is working, and I'm able to access phpLDAPadmin GUI and am also able to create OU and groups using the GUI, but I'm not able to create users.

When I try to create a user I get the following error:

Error trying to get a non-existant value (appearance,password_hash)

This template uses a selection list for attribute [gidNumber], however the selection list is empty.
You may need to create some dependancy entries in your LDAP server so that this attribute renders with values.
 Alternatively, you may be able to define the appropriate selection values in the template file.


File /usr/share/phpldapadmin/lib/functions.php (444)
        Function error (a:5:{i:0;s:67:"Error trying to get a non-existant ...)
File /usr/share/phpldapadmin/lib/ds.php (81)
        Function debug_dump_backtrace (a:2:{i:0;s:67:"Error trying to get a non-existant ...)
File /usr/share/phpldapadmin/lib/TemplateRender.php (2469)
  Function getValue (a:2:{i:0;s:10:"appearance";i:1;s:13:"password_hash...)
File  /usr/share/phpldapadmin/lib/TemplateRender.php ()
  Function drawDefaultHelperPasswordAttribute (a:2:{i:0;O:17:"PasswordAttribute":34:{s:4:"name";s...)
File  /usr/share/phpldapadmin/lib/Visitor.php (58)
        Function call_user_func_array (a:2:{i:0;a:2:{i:0;O:14:"TemplateRender":9:{s:24:"...)
File /usr/share/phpldapadmin/lib/PageRender.php (1005)
        Function __call (a:2:{i:0;s:4:"draw";i:1;a:3:{i:0;s:13:"DefaultHelp...)
File /usr/share/phpldapadmin/lib/PageRender.php (1005)
        Function draw (a:3:{i:0;s:13:"DefaultHelper";i:1;O:17:"PasswordAt...)
File /usr/share/phpldapadmin/lib/PageRender.php ()
        Function drawFormReadWriteValuePasswordAttribute (a:2:{i:0;O:17:"PasswordAttribute":34:{s:4:"name";s...)
File /usr/share/phpldapadmin/lib/Visitor.php (58)
        Function call_user_func_array (a:2:{i:0;a:2:{i:0;O:14:"TemplateRender":9:{s:24:"...)
File /usr/share/phpldapadmin/lib/PageRender.php (596)
        Function __call (a:2:{i:0;s:4:"draw";i:1;a:3:{i:0;s:18:"FormReadWri...)
File /usr/share/phpldapadmin/lib/PageRender.php (596)
        Function draw (a:3:{i:0;s:18:"FormReadWriteValue";i:1;O:17:"Passw...)
File /usr/share/phpldapadmin/lib/PageRender.php ()
        Function drawFormValueAttribute (a:2:{i:0;O:17:"PasswordAttribute":34:{s:4:"name";s...)
File /usr/share/phpldapadmin/lib/Visitor.php (58)
        Function call_user_func_array (a:2:{i:0;a:2:{i:0;O:14:"TemplateRender":9:{s:24:"...)
File /usr/share/phpldapadmin/lib/TemplateRender.php (2159)
        Function __call (a:2:{i:0;s:4:"draw";i:1;a:3:{i:0;s:9:"FormValue";i...)
File /usr/share/phpldapadmin/lib/TemplateRender.php (2159)
        Function draw (a:3:{i:0;s:9:"FormValue";i:1;O:17:"PasswordAttribu...)
File /usr/share/phpldapadmin/lib/TemplateRender.php ()
        Function drawValueAttribute (a:2:{i:0;O:17:"PasswordAttribute":34:{s:4:"name";s...)
23

Open template file /usr/share/phpldapadmin/lib/TemplateRender.php in your favorite editor like:

 sudo vi  /usr/share/phpldapadmin/lib/TemplateRender.php

Search line

$default = $this->getServer()->getValue('appearance','password_hash'); 

and change it to

$default = $this->getServer()->getValue('appearance','password_hash_custom');

and save that file and reload browser it will not show this error.

1
  • sed -i -e 's/password_hash/password_hash_custom/g' /usr/share/phpldapadmin/lib/TemplateRender.php && sudo service apache2 restart – FreeSoftwareServers Sep 13 '16 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.