LDAP easy question
Moderator: General Moderators
LDAP easy question
Hi guys,
Hopefully someone will be able to point me in the right direction with this.
I have developed an Intranet for my company which is powered by a LAMP server. I have been asked to authenticate users against our domain controller ($MS), so I don't have to maintain a different user logon/password for Windows and the Intranet. Users also need to be able to logon from outside the company using there user name and password.
My first thought was to use LDAP which looks seems very easy from the PHP side of things. The problem I have having is getting LDAP working as I have found too many different solutions to doing this.
What do I actually need to do this? I have installed the php5-ldap (LAMP server is a Ubuntu box). Is this sufficient or do I need to install an ldap client on this box too?
I am starting to think that a radius server is easier ...
Hopefully someone will be able to point me in the right direction with this.
I have developed an Intranet for my company which is powered by a LAMP server. I have been asked to authenticate users against our domain controller ($MS), so I don't have to maintain a different user logon/password for Windows and the Intranet. Users also need to be able to logon from outside the company using there user name and password.
My first thought was to use LDAP which looks seems very easy from the PHP side of things. The problem I have having is getting LDAP working as I have found too many different solutions to doing this.
What do I actually need to do this? I have installed the php5-ldap (LAMP server is a Ubuntu box). Is this sufficient or do I need to install an ldap client on this box too?
I am starting to think that a radius server is easier ...
according to http://archive.ubuntu.com/ubuntu/dists/ ... ackages.gz there is a package php5-ldap containing the ldap extension module for php 5 in feisty's main repository.
http://archive.ubuntu.com/ubuntu/dists/feisty/main/binary-i386/Packages.gz wrote:Package: php5-ldap
Priority: optional
Section: web
Installed-Size: 96
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: i386
Source: php5
Version: 5.2.1-0ubuntu1
Depends: libc6 (>= 2.5-0ubuntu1), libldap2 (>= 2.1.17-1), phpapi-20060613+lfs, php5-common (= 5.2.1-0ubuntu1)
Filename: pool/main/p/php5/php5-ldap_5.2.1-0ubuntu1_i386.deb
Size: 17358
MD5sum: fdb082c4cb207d5fd103f3174b29a626
SHA1: ca74de8333ded192a302a240833b1babd2e6707d
SHA256: 6b86135b0724315e8913d5cfe829fa8574f370e83f3f37f0bf1a3e81713a664c
Description: LDAP module for php5
This package provides a module for LDAP functions in PHP scripts.
.
PHP5 is an HTML-embedded scripting language. Much of its syntax is borrowed
from C, Java and Perl with a couple of unique PHP-specific features thrown
in. The goal of the language is to allow web developers to write
dynamically generated pages quickly.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Hi Volka,
Thanks, I have already installed the package. The ldap.so extension is already enabled in php.ini, but ldap doesn't show in in phpinfo().
A lot of pages I read were talking about using openLDAP to authenticate, hence why it threw me off.
I that is all I need I'll give it another go.
Thanks,
Adam
Thanks, I have already installed the package. The ldap.so extension is already enabled in php.ini, but ldap doesn't show in in phpinfo().
A lot of pages I read were talking about using openLDAP to authenticate, hence why it threw me off.
I that is all I need I'll give it another go.
Thanks,
Adam
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Wouldn't Ubuntu's package manager take care of such dependencies?
http://archive.ubuntu.com/ubuntu/dists/feisty/main/binary-i386/Packages.gz wrote:Depends: libc6 (>= 2.5-0ubuntu1), libldap2 (>= 2.1.17-1), phpapi-20060613+lfs, php5-common (= 5.2.1-0ubuntu1)
Got it working...
My original attempt was correct (apt-get install php5-ldap). Ubuntu place the ldap.so libaray in the wrong place (non the correct extensions dir). After moving this library, phpinfo showed LDAP working and it is working fine.
Now to get SSL working ...
So Volka, yes you were right: Wouldn't Ubuntu's package manager take care of such dependencies?
Thanks all.
My original attempt was correct (apt-get install php5-ldap). Ubuntu place the ldap.so libaray in the wrong place (non the correct extensions dir). After moving this library, phpinfo showed LDAP working and it is working fine.
Now to get SSL working ...
So Volka, yes you were right: Wouldn't Ubuntu's package manager take care of such dependencies?
Thanks all.
Strange. Have you installed all of the packages involved via yum/synaptics? If so you might want to report a bug to ubuntu.AP81 wrote:Ubuntu place the ldap.so libaray in the wrong place (non the correct extensions dir).
If you have installed anything "manually", e.g. by compiling from sources without using ubuntu's build system, it is possible you now have two sets of default paths on your system
Hi Volka,
Nothing has been compiled by source. I installed everything via apt, but I noticed that apt created two separate extension dirs, one was:
/usr/lib/php5/20051025/ and the other /usr/lib/php5/ext/. Both of these also had the same library files in there.
By default, apache was using the /usr/lib/php5/20051025/ directory, so I changed the extension dir in php.ini to use ext instead, following the standard naming convention. I did this some time ago (a few months), and had forgotten about it.
So an apt-get install php5-ldap put it in the 20051025 which was my problem.
Thanks,
Adam
Nothing has been compiled by source. I installed everything via apt, but I noticed that apt created two separate extension dirs, one was:
/usr/lib/php5/20051025/ and the other /usr/lib/php5/ext/. Both of these also had the same library files in there.
By default, apache was using the /usr/lib/php5/20051025/ directory, so I changed the extension dir in php.ini to use ext instead, following the standard naming convention. I did this some time ago (a few months), and had forgotten about it.
So an apt-get install php5-ldap put it in the 20051025 which was my problem.
Thanks,
Adam