LDAP hack9 and Joomla - Patch for fresh install

Discuss the integration of Joomla! with other products. ie SMF, phpbb etc etc

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
jamoukha
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 11, 2005 9:07 pm

LDAP hack9 and Joomla - Patch for fresh install

Post by jamoukha » Tue Oct 11, 2005 9:20 pm

Here's the ldaphack built for Joomla V1.0.2. To apply, you will need a fresh Joomla install w/ non of the files modified.

Now, get the file over to what ever directory you want. I placed it under /tmp and unzip'ed there.

Now login to the server and go into the root path that you installed Joomla in. For me, its in the root web directory under a folder called Joomla:

/var/www/html/joomla

From that directory, just run the following command:

patch -p1 < /tmp/ldaphack9.joomla.patch

The should patch all the Joomla files, and also create backups of the originals. If you ran this command as a different user from what the webserver runs as, change the permissions of the directories and files added to match the webserver user (Or creating and modifying auth plugs will not work).

Included in this patch are some of my modifications to the ldaphack9 files. Here's what I remember:

1- Users can be modified without mistakingly changing them to local users.
2- Added email authentication pluging listed in Mamboforge's tracker of ldaphack9.
3- Modified the orig hack to work w/ Joomla V1.0.2

I'm not the orignial developer of this hack. I just needed it for a migration from Mambo to Joomla I'm doing for our intranet, so I decided to share my changes.

Anyway, enjoy, and good luck
Last edited by jamoukha on Thu Oct 20, 2005 5:39 pm, edited 1 time in total.

jamoukha
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 11, 2005 9:07 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by jamoukha » Tue Oct 11, 2005 11:44 pm

Please don't use the file, I found that I made a mistake in the joomla.php file. I'll post an updated one here soon.

Jon Stober
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Oct 04, 2005 8:48 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by Jon Stober » Tue Oct 18, 2005 5:22 pm

Are you going to repost the patch??

jamoukha
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 11, 2005 9:07 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by jamoukha » Thu Oct 20, 2005 3:24 am

I will, I promise. I have to finish the site I'm working on by friday, so I've been working overtime on that. Once done, I can redo the patch.

If you really need it and you're good w/ php, apply the patch. One of the last if statements that were added to joomla.php was included in a previous if statement (i.e. I didn't close the previous if statement). You can find it by searching for }}. The result is that you can never login if your username is not in the db already (If I remember correctly).

I'm sorry I can't be more specific, I'm can't access the files right now. If you can wait, I should have it by Friday, or Sunday at the latest.

jamoukha
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 11, 2005 9:07 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by jamoukha » Thu Oct 20, 2005 3:05 pm

As promised, and as an added bonus, I've created it for Joomla V1.0.3
Last edited by jamoukha on Thu Oct 20, 2005 5:39 pm, edited 1 time in total.

Jon Stober
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Oct 04, 2005 8:48 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by Jon Stober » Thu Oct 20, 2005 4:04 pm

Hey I do you need to patch before or after the install?  I have tried both and everything seemed to go smoothly unitl I went into the administrator panel and tried to click on the link for authentication sources and all it does is reload the adminsitrator home page. Do you have any Idea??

jamoukha
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 11, 2005 9:07 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by jamoukha » Thu Oct 20, 2005 5:10 pm

Hmm, I don't know. I'm using V1.0.3 and it works fine for me. Let me try a fresh install and I'll let you know.

jamoukha
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 11, 2005 9:07 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by jamoukha » Thu Oct 20, 2005 5:39 pm

I was missing the com_authplugins and authentication directory/files from the patch. It should work now.
You do not have the required permissions to view the files attached to this post.

Jon Stober
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Oct 04, 2005 8:48 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by Jon Stober » Thu Oct 20, 2005 6:20 pm

Ok I have it successfully installed it I think....  I can now create authentication sources but when I try to login using my Ldap user and pass It goes to a screen that shows in the upper left corner my password then under it my username and base dn info. There is also a error that pops up and says Invaild username or password. and when you click ok it dissapears and takes you back to the main page.  Any ideas would help. Thank you for your patience.

jamoukha
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 11, 2005 9:07 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by jamoukha » Thu Oct 20, 2005 7:32 pm

hmm, maybe a problem with the your query to the LDAP server? I know there's a bug (listed in the tracker at mamboforge.net) in the ldap hack that complains that passwords show up. I don't get that error, so I can't tell you what's going on.

Jon Stober
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Oct 04, 2005 8:48 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by Jon Stober » Thu Oct 20, 2005 7:34 pm

Thanks for all the help and spending the time to convert the files.  I think I putting in my settings wrong

BeanDip
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Aug 29, 2005 2:09 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by BeanDip » Thu Oct 27, 2005 1:16 pm

Where is the LDAP patch hosted at?  When I look at the project on Joomla's Developer site it tells me that there are no files available.

jamoukha
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 11, 2005 9:07 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by jamoukha » Thu Oct 27, 2005 10:50 pm

Try mamboForge.net and search for LDAP, or download the patch (You need to login to see it) and run it. Its the same thing, I just thought this would be easier. The patch command will patch the files even if you made changes to them, that is, as long as the changes are not to the parts being removed. Even then, it will patch what it can and dump out what it couldn't into a filename.rej so you can do it by hand.

BeanDip
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Aug 29, 2005 2:09 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by BeanDip » Mon Oct 31, 2005 3:29 pm

Thanks I didn't realize I had to login to see the file.

I had LDAPhack9 working with Mambo so I thought I would be able to figure out this but I get the same thing as Jon Stober has in the previous post.  It goes to a screen that shows the LDAP login info.  I traced it down to line 135 in /includes/authentication/plugins/ldapauthenticator.php which has this line:

echo $this->_config['ldap_password']."".$this->_config['ldap_connect']."";

I commented out the line so now all I get is a blank screen when I login with an LDAP user.

I have tried to trace this further and it appears that it reloads the main Joomla index.php with the user attributes set  but I don't see why all I get is a blank page.  The problem seems to be in the handoff between reloads so I turned on PHP debugging but it doesn't give me any output.

I'll keep working on this and will post any results I get.  If you have any ideas for me I am open to them.

Jon Stober
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Oct 04, 2005 8:48 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by Jon Stober » Mon Oct 31, 2005 3:53 pm

I got it to work fine. The latest patch he released work with 1.03 great. The thing I was doing wrong was the server address I was trying to connect to. I was using https:// when I should have been using ldap://&nbsp; Great patch though.

BeanDip
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Aug 29, 2005 2:09 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by BeanDip » Mon Oct 31, 2005 4:10 pm

Where did you make that change? 

Jon Stober
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Oct 04, 2005 8:48 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by Jon Stober » Mon Oct 31, 2005 4:11 pm

I changed that when I created the authentication source

BeanDip
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Aug 29, 2005 2:09 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by BeanDip » Mon Oct 31, 2005 5:21 pm

Hmm let me tell you what I have and maybe you can tell me where I need to address the change.

In Joomla under Authentication Sources I have an LDAP connection published with the following settings:

LDAP Host :  192.168.xxx.xxx  (Internal Address of my Active Directory Domain controller)
LDAP Port :  389
Use LDAP3: checked
Negociate TLS : unchecked
Don't follow referrels:  unchecked

Base DN: dc=corporate,dc=domain,dc=local
Connect String: CN=Administrator,OU=My_Users,DC=corporate,DC=domain,DC=local
Connect Password:
Search String: SAMAccountName=[login]
Users DN :

Default Group: Registered
User Attributes: email=mail;name=cn

These are the settings that worked with my Mambo site before the Joomla conversion.  Small changes have been made to protect the innocent.

Thanks for the help!

Jon Stober
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Oct 04, 2005 8:48 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by Jon Stober » Mon Oct 31, 2005 7:29 pm

under LDAP HOST try ldap://(IP ADDRESS), of course use the ip in the instead of the parentheses

BeanDip
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Aug 29, 2005 2:09 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by BeanDip » Mon Oct 31, 2005 9:08 pm

Well, no luck.  I still get the blank page even with the ldap:// change. 

I fired up my old server with the Mambo site and it still works there. 

On the new server I started with a fresh Joomla 1.03 site and dumped and imported the Mambo Mysql db then ran the Joomla conversion against it.  Then I ran jamouka's patch so all my files should match be the correct ones.

I will have more time tomorrow to look into this.  Thanks again for the help.

BeanDip
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Aug 29, 2005 2:09 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by BeanDip » Tue Nov 01, 2005 7:19 pm

  :-*  I found it.  I had installed php4_ldap but I forgot to include it in the php.ini extensions list. 

It all works now.  Thanks again.

almooj
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Wed Nov 30, 2005 2:46 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by almooj » Thu Dec 01, 2005 9:04 am

u mean run it in command becouse i get an error that patch is not an internal or external command  :'( :'( :'(

almooj
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Wed Nov 30, 2005 2:46 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by almooj » Thu Dec 01, 2005 10:58 am

is it possible to do this with windows 2003 web edition?

jamoukha
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 11, 2005 9:07 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by jamoukha » Tue Dec 06, 2005 2:56 am

almooj wrote: is it possible to do this with windows 2003 web edition?
I am assuming that you are asking if you can run the command above in windows 2003. I believe the answer would be no since the command is a Linux command, but I might be wrong and there might be something that will allow you to do the same in Windows. I just don't know windows that well.

almooj
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Wed Nov 30, 2005 2:46 pm

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by almooj » Tue Dec 06, 2005 7:11 am

hmm k thanks anyway :P

User avatar
Irie
Joomla! Intern
Joomla! Intern
Posts: 76
Joined: Wed Jan 04, 2006 3:55 pm
Location: Costa Rica
Contact:

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by Irie » Tue Feb 14, 2006 5:17 pm

Hi

How I can integrate  LDAP with Joomla 1.0.7?

buerste
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Sep 15, 2005 7:00 am

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by buerste » Tue Mar 14, 2006 12:21 pm

...or maybe for 1.08 ?? ;)

buerste
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Sep 15, 2005 7:00 am

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by buerste » Wed Mar 15, 2006 9:05 am

OK, i´ve done it for 1.08 and will publish it here today...  ;)

yiendos
Joomla! Intern
Joomla! Intern
Posts: 74
Joined: Fri Aug 26, 2005 8:46 am
Location: Northamptonshire, England, UK

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by yiendos » Wed Mar 15, 2006 9:06 am

You beauty can't wait to see the code!
Cloud based systems running on Joomla and Nooku Framework:
http://place-me.com

buerste
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Sep 15, 2005 7:00 am

Re: LDAP hack9 and Joomla - Patch for fresh install

Post by buerste » Wed Mar 15, 2006 2:32 pm

Here we go: http://www.d-works.de/download/ldaphack9_joomla108.zip (after bugfixing) 
do a fresh joomla 1.08 install and copy and replace the files in the package.
set rights recusivly to 777 for the page directory and then recusivly back to 644 in the admin panel. this should works fine here!  :)
Last edited by buerste on Sun Mar 19, 2006 11:31 am, edited 1 time in total.


Locked

Return to “Integration & Bridges - 1.0.x”