Author Topic: LDAP administration using phpLDAPadmin  (Read 20357 times)

xorred

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
LDAP administration using phpLDAPadmin
« on: July 01, 2009, 10:30:09 pm »
use at your own risk.

Code: [Select]
apt-get install phpldapadmin
Since we're setting up for multiple installs, we'll give each one a different config file

Code: [Select]
cp -R /usr/share/phpldapadmin /var/www/myphpldapadmin
Code: [Select]
cp /etc/phpldapadmin/config.php /etc/phpldapadmin/first.config.php
rm /var/www/myphpldapadmin/config/config.php
ln -s /etc/phpldapadmin/first.config.php /var/www/myphpldapadmin/config/config.php
chmod +r /etc/phpldapadmin/first.config.php

Now customize the config file. You'll probably need to change the following lines:

Code: [Select]
$config->custom->session['blowfish'] = 'randomstringofyourseditthat';  //Add a random string for encryption purposes
$ldapservers->SetValue($i,'server','name','ebox');  // The name to display
$ldapservers->SetValue($i,'server','host','127.0.0.1');  // Address of the LDAP server
$ldapservers->SetValue($i,'server','port','389');   // Port number
$ldapservers->SetValue($i,'server','base',array('dc=example,dc=com'));  // Base dn

And open http://ebox-ip-address/myphpldapadmin/

Taken from https://help.ubuntu.com/community/InstallingphpLDAPadmin

Thank you, Blinkiz ;)

That should be it.

pro@methean

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: LDAP administration using phpLDAPadmin
« Reply #1 on: December 16, 2009, 08:24:09 pm »
So this looks like a good way to browse and view stuff. But I can't see how to get past anonymous access.

Is there an admin account or password that can be used? The one set up in ebox does not appear to work here, at least not admin.

Am I missing something obvious?


binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: LDAP administration using phpLDAPadmin
« Reply #2 on: December 17, 2009, 11:32:05 pm »
Hi, use the password stored in /etc/ldap.secret
Kind regards, Björn

cat /etc/ldap.secret

pro@methean

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: LDAP administration using phpLDAPadmin
« Reply #3 on: December 18, 2009, 03:46:58 am »
Hi, use the password stored in /etc/ldap.secret
Kind regards, Björn

cat /etc/ldap.secret


Thanks. In the end needed to change that password, too long and unwieldy to use for web authentication. Changed in /etc/ldap/slapd.conf (search for "rootpw") and updated /etc/ldap.secret to match. Doesn't seem to have broken anything ebox wise.

Using slapcat managed to figure out all ebox ldap entries seem to be under dc=ebox so used these in the phpldapadmin config:

Code: [Select]
$ldapservers->SetValue($i,'server','base',array('dc=ebox'));
$ldapservers->SetValue($i,'login','dn','cn=admin,dc=ebox');

In with edit privs! Now I am really living dangerously!

- Pro

Aleksei Hecht

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
    • ConexionesBCN - nuevas tecnologías & pequeñas organizaciones
Re: LDAP administration using phpLDAPadmin
« Reply #4 on: April 04, 2010, 08:39:35 pm »
Really sweet. I was looking for something like this. Thanks for this procedure.

I have recently tried it with an ebox 1.4 installation on top of Ubuntu Hardy.

I can login anonymously and browse the ebox directory.
I can also login successfully leaving the login DN blank and entering the password stored in ldap.secret but although in this case there is no authentication I am not able to browse the directory and on the left panel I only get the menu option to login again. ¿Any clues?
I am not able to login using cn=admin,dn=example,dn=com or using cn=ebox,dn=example,dn=com because I get an authentication failure in both cases.

Thanks, keep up the good work.

jcgarcia

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: LDAP administration using phpLDAPadmin
« Reply #5 on: April 04, 2010, 09:49:35 pm »

I am not able to login using cn=admin,dn=example,dn=com or using cn=ebox,dn=example,dn=com because I get an authentication failure in both cases.


Hi, I am new in this, but  in my case I use and works with

 cn=ebox, dn=[my machine name], dn=mshome,dn=net

with the passwd in ldap.secret

edit in config.php
$ldapservers->SetValue($i,'login','dn',cn=ebox, dn=[my machine name], dn=mshome,dn=net);

Maybe helps