尝试在LDAP中获取不存在的值(外观,password_hash)时出错


13

我已经在Ubuntu 14.04(Trusty Tahr)上安装了LDAP和phpLDAPadmin。它正在工作,并且我能够访问phpLDAPadmin GUI,也能够使用该GUI创建OU和组,但是我无法创建用户。

当我尝试创建用户时,出现以下错误:

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...)

Answers:


23

/usr/share/phpldapadmin/lib/TemplateRender.php在您喜欢的编辑器中打开模板文件,例如:

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

搜索线

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

并将其更改为

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

并保存该文件并重新加载浏览器,它将不会显示此错误。


sed -i -e's / password_hash / password_hash_custom / g'/usr/share/
phpldapadmin/lib/TemplateRender.php
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.