9

I'm trying to install LDAP. I've installed slapd and the PhpLDAPAdmin tool on Debian, but when I'm logged in, I cannot do anything. Despite I've logged in as 'cn=admin,dc=barbucha', I see on the right side instead of the tree:

Logged in as: dc=example,dc=com
   This base cannot be created with PLA.

I tried Google, but this error seems to be a rare one. I've created a database there is the 'cn=admin,dc=barbucha' in. (Otherwise I could not use the name to log in.)

Potherca
  • 13,207
  • 5
  • 76
  • 94
Theodor Keinstein
  • 1,653
  • 2
  • 26
  • 47

2 Answers2

18

This happens quite rarely. From an unknown reason the configuring process didn't get data from the LDAP server and didn't set proper values in the /etc/phpldapadmin/config.php script. Somewhere near by line 300 were two important lines generated erroneously:

$servers->setValue('server','base',array('dc=example,dc=com'));
$servers->setValue('login','bind_id','cn=admin,dc=example,dc=com');

These settings uses PhpLDAPAdmin to access LDAP datatase regardless to the login name you've been logged in with. To update these lines helped:

$servers->setValue('server','base',array('dc=barbucha'));
$servers->setValue('login','bind_id','cn=admin,dc=barbucha');
Theodor Keinstein
  • 1,653
  • 2
  • 26
  • 47
  • 1
    maybe it's not that rare: it's enough to install phpldapadmin *before* slapd for example. – Kristóf Szalay Mar 11 '17 at 13:21
  • I faced this issue when I uninstalled my ldap server and re-installed with a different Base DN, thanks to your answer everything works fine. – mSatyam Feb 15 '19 at 11:15
0

probably you should add a LDAP root first: create a file in /etc/openldap/

vim /etc/openldap/base.ldif

then input:

dn: dc=em,dc=com
o: RDCenter
objectclass: dcobject
objectclass: organization

and run this command in the directory:

ldapadd  -f base.ldif  -x -D  cn=Admin,dc=em,dc=com -W

Input your own password,and the root node would be added. Reopen the phpldapadmin,you will find everything is well