vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Integration with vBulletin - vBulletin Ldap Authentication Plugin (https://vborg.vbsupport.ru/showthread.php?t=148573)

kraj 06-20-2008 12:52 PM

Hello there,
first: Thank you very much for this plugin. It's quite useful :)

But I've got a problem. I just wanted to authenticate the admins against the LDAP, too, and tried the hint to comment out the following part:

PHP Code:

if(($vbulletin->GPC['logintype'] == "cplogin") || ($vbulletin->GPC['logintype'] == "modcplogin"))
{
    return;


Now trying to login with the LDAP-credentials the user gets redirected to the 'badlogin'-Message - so no authentication against the LDAP is done.

The normal password - which worked before this change - does not work any more [what is quite logical ;) ]...

Can anyone help, please?
Thanks a lot in advance!

randycarroll 07-25-2008 05:18 PM

I'm having trouble getting logged in. This, like another user here, is critical to a program we are working on internally.

++ -------- START -------- ++
++ LoginType: Normal Login
++ LdapFiler: (cn=test)
++ LdapServer: connection successful
++ presearch /t Resource id #22,cn=test,cn=users,DC=pmac,DC=internal,(cn=test)
++ LdapSearch: there is no such user in the directory

I get that in the debug. I've also based the search base just dc=pmac,dc=internal and placed the "test" user up in the top of the domain.

The username is "test" and the cn is also test (according to ldp.exe).

I get a word that there is a connection with no problem, but that the user does not exist.

Weird. Any help is greatly appreciated.

malcolmx 07-26-2008 09:06 AM

Quote:

Originally Posted by randycarroll (Post 1584019)
++ presearch /t Resource id #22,cn=test,cn=users,DC=pmac,DC=internal,(cn=test)


the dn is not right. that ,(cn=test) seems really wrong. what is the full dn to your user? (maybe ldp.exe show it). please post the content of the ldap config file (from my module).

-malc

randycarroll 07-28-2008 03:33 PM

Expanding base 'CN=test,DC=pmac,DC=internal'...
Result <0>: (null)
Matched DNs:
Getting 1 entries:
>> Dn: CN=test,DC=pmac,DC=internal
4> objectClass: top; person; organizationalPerson; user;
1> cn: test;
1> description: leave me for randyc;
1> givenName: test;
1> distinguishedName: CN=test,DC=pmac,DC=internal;

There is a snippet of the ldp.exe results.

this is only a test account I'm trying this with.

randycarroll 07-28-2008 10:39 PM

Also, here is some more info:
Warning: ldap_search() [function.ldap-search]: Search: Operations error in [path]/ldapAuth/controller.php on line 49

Warning: ldap_get_entries(): supplied argument is not a valid ldap result resource in [path]/ldapAuth/controller.php on line 50

That is the debug controller.php. I turned on PHP debugging for the server, so now it is spitting hte errors out.

randycarroll 07-30-2008 03:56 PM

bump -- anyone able to shine some light?

randycarroll 07-31-2008 12:13 AM

Is it possible to use both this and the built in database?

We want both our employees and outside users to be able to sign up and use this service.

malcolmx 07-31-2008 04:11 AM

Quote:

Originally Posted by randycarroll (Post 1586039)
Expanding base 'CN=test,DC=pmac,DC=internal'...
Result <0>: (null)
Matched DNs:
Getting 1 entries:
>> Dn: CN=test,DC=pmac,DC=internal
4> objectClass: top; person; organizationalPerson; user;
1> cn: test;
1> description: leave me for randyc;
1> givenName: test;
1> distinguishedName: CN=test,DC=pmac,DC=internal;

There is a snippet of the ldp.exe results.

this is only a test account I'm trying this with.

as you see, you have another DN here as in your first post:
Code:

cn=test,cn=users,DC=pmac,DC=internal,(cn=test)
please post me the ldap config as i asked some days ago.

thanks

-malc

malcolmx 07-31-2008 04:12 AM

Quote:

Originally Posted by randycarroll (Post 1587895)
Is it possible to use both this and the built in database?

We want both our employees and outside users to be able to sign up and use this service.

you need to modify the plugin then:
search for the ldap user (if not found) -> make internal auth

-malc

randycarroll 07-31-2008 06:55 AM

MalcomX,

Sorry to have bugged this month. After two days of constant tweaking, I've made a change to the script.

My final problems lie here:
At the end of controller.php when it calls upon function_login.php from VB, it is giving errors about missing arguments. I get these, however, I can still login no problem. Essentially, if I shut off verbose error reporting, I can use this script error free :-).

Do you want a copy of the changes I've made? For whatever reason, before ldap_search I had to ldap_bind with a username/password in order to be able to search below the base of the tree.

malcolmx 07-31-2008 07:22 AM

i assume you use active directory as ldap server?

if you want to give me the changes, please make a diff and post it here on the boards. i will look at the changes.

-malc

randycarroll 07-31-2008 07:28 AM

I'll send ya a PM with the actual file details.

It's Active Directory on Windows Server 2003.

edit: I'll put it up tomorrow -- I'm going to clean up/comment my code additions + its easier to manipulate files at work.
Laptop keyboard -- not for me.

edit: Hold off a little more, can we fix the missing arguments issue? At the end of controller.php when it calls upon function_login.php from VB, it is giving errors about missing arguments. I get these, however, I can still login no problem. Essentially, if I shut off verbose error reporting, I can use this script error free :-).

Warning: Missing argument 4 for verify_authentication(), called in [path]/ldapAuth/controller.php on line 98 and defined in [path]/includes/functions_login.php on line 135

Warning: Missing argument 5 for verify_authentication(), called in [path]/ldapAuth/controller.php on line 98 and defined in [path]/includes/functions_login.php on line 135

Warning: Missing argument 6 for verify_authentication(), called in [path]/ldapAuth/controller.php on line 98 and defined in [path]/includes/functions_login.php on line 135

malcolmx 08-01-2008 04:52 AM

look at the file forum_root/includes/functions_login.php. there you can find the function verify_authentication().

i didnt need to pass over some parameters, since thre is no need to verify.

text from my initial post:
Quote:

Additional Notes:
If you are running a Microsoft Active Directory as Ldap server you have to change some settings to allow anonymous queries. This is described at
Novell and Microsoft

randycarroll 08-01-2008 05:36 AM

Quote:

Originally Posted by malcolmx (Post 1588917)
look at the file forum_root/includes/functions_login.php. there you can find the function verify_authentication().

i didnt need to pass over some parameters, since thre is no need to verify.

text from my initial post:

I'm eliminating the need for anonymous queries and modifying the script for authenticated binding.

malcolmx 08-01-2008 05:48 AM

thats nice.i didnt implement this, because some of my customers (when i sold the plugin) had problems with some tachnical aspects. the administrator of the company didnt even know what a DN is. so i never implemented this (in case there are more people that just know: right click, left click, right,...)

-malc

kev82 08-13-2008 09:50 AM

Would allowing (or enabling) admincp/modcp logins with this script be difficult? What would I need to do to enable it?

malcolmx 08-13-2008 10:05 AM

thats easy. but before you do that, you have to give users rights to access the admin /mod cp.

Code:

if(($vbulletin->GPC['logintype'] == "cplogin") || ($vbulletin->GPC['logintype'] == "modcplogin"))
{
        return;
}

try to remove this after you have set the rights. that should be the solution.

-malc

kev82 08-13-2008 12:18 PM

I commented this bit out and gave the proper permissions but that didn't seem to cut it... Could there be something else?

btw thanks for the fast reply, I didn't expect that :)

malcolmx 08-13-2008 12:26 PM

maybe, that was just a shot into the blue. i will try it in the next days and give you some hint.

-malc

kev82 08-18-2008 08:39 AM

Did you get a chance to look at this? I'm no good with vbulletin architechture so I couldn't figure this one out myself.

dellusionaldude 08-19-2008 07:32 PM

Quote:

1. copy ldapAuth directory to your vb forum installation directory
2. change the path to controller.php directory in ldap-plugin.xml
I did no. 1, but have no idea how to do no. 2. Please help.

Jose

dellusionaldude 08-19-2008 11:57 PM

Hey Guys, I figured out the problem- my zip file was not extracting properly, so I never saw the config or plugin files for LDAP.

Kahuna900 08-21-2008 04:58 PM

any more word on the "authenticated binding". My admin will not allow anonymous access to the active directory LDAP server.

dellusionaldude 08-28-2008 08:21 PM

Cannot figure out how to test if plugin is working. When i enter my credentials, they are not recognized, so it seems that vB is not querying active directory via the LDAP plugin. Please help.

upnorth 12-16-2008 11:50 AM

malcolmx first I would like to say this is a great add-on. Exactly what we needed in order to move forward with utilizing vB on our intranet so thanks!!

Everything works correctly and I'm not having any problems but I have been asked a number of times if there is any way to add the users full name to the users vB account? My thought was that I could add two custom user fields called first name and last name but is there any easy way to pull the first and last name out of LDAP and add them to these fields?

Rondo44 02-24-2009 07:52 PM

what was the line of code to add for this functionality and to what file. if i may ask. thank you

Johnny G 07-05-2009 07:06 PM

Hi - first post, newbie alert, etc.
I've taken over running a forum which has around 5000 members. Now, we've got an online shop (which isn't quite live yet) running on OSCommerce and I'm just in the process of putting Joomla! on the site.

Now, I know LDAP from work, but there's a wondering I've got about how this works.

Firstly, if I install this mod on a clean LDAP database, how can I import the 5000 usernames from the vBulletin installation?

Would I be correct in assuming that when a user logs in to the forum, the LDAP would be checked, then report no such user. Then vB would be queried and report a success - with the LDAP then taking in the information from vB.

... or have I got this completely wrong. If so, any pointers on how to get the users in the LDAP DB?

Thanks in advance!

Aylwin 07-13-2009 01:21 PM

Quote:

Originally Posted by Johnny G (Post 1843347)
Would I be correct in assuming that when a user logs in to the forum, the LDAP would be checked, then report no such user. Then vB would be queried and report a success - with the LDAP then taking in the information from vB.

I think your understanding is the wrong way 'round.

The plugin will kick in after failed vB login. In other words, any users that are on vB already can login directly. For users that are not yet registered, they are checked from the LDAP. If they are on LDAP but not on vB then a new user is created.

So, LDAP does not get information from vB. vB is the one that gets information from LDAP. Your existing 5000 users will continue to use vB as before. There is no need to move them to LDAP.

Aylwin 07-13-2009 01:25 PM

In controller.php, there is an if condition that checks for errors before a new user is created:
Code:

                if($newuser->errors)
How can I check what exactly the error is?

If I remove the if condition and force the new user to be created, I get the following error message:

Code:

Fatal error: Unable to proceed with save while $errors array is not empty in class vb_datamanager_user in /includes/class_dm.php on line 763

drsox 11-15-2009 09:07 AM

Fantastic, I had to make a few changes to the line which logs people in once they have passed authentication, other than that - perfect.

Thanks malcolmx!

Tom - www.mouselike.org

ysam 12-28-2009 07:43 PM

Ok I am confused now.. Which LDAP mode has better support and has anyone got it to work on vb4 yet?

malcolmx 12-29-2009 08:04 AM

i have already installed a test system with vb4 and i think a new version with vb4 support will be out in the first week of january.

malc

ysam 12-29-2009 10:32 PM

Thank you Malc,

since I am testing the whole ldap functionality starting with Haqa's mod,
I am realy looking forward to see yours as well since both are very interesting implementations.

malcolmx 01-02-2010 10:49 AM

plugin is ready for vbulletin version4

https://vborg.vbsupport.ru/showthread.php?t=231909

Dwayne 02-14-2011 07:49 PM

Quote:

Originally Posted by rrusinko (Post 1545271)
I am new to using plugins for vBulletin and the error is probaly basic.
I downloaded the plugin and followed the directions, but when I get to step 6:
I receive a message "invalid file specified".
Step 6 is in admin cp import the product at "Download / Upload" Plugins
I am using the plugin hooks_ldap.xml located in the ./includes/xml/.

Any help would be appreciated.


I'm getting this, not sure how to resolve.


Also does this work ok with OpenLDAP (linux debian), seems pretty AD heavy?

malcolmx 02-16-2011 05:01 PM

Quote:

Originally Posted by Dwayne (Post 2162595)
I'm getting this, not sure how to resolve.


Also does this work ok with OpenLDAP (linux debian), seems pretty AD heavy?

sure, i am running it with sun enterprise ldap server. it doesnt matter which ldap server you use.

-malc

Dwayne 04-13-2011 11:05 PM

Sweet thanks for the reply.

I'll have another crack at it today.

OU=People,dc=host,dc=co,dc=nz
uid=

MatthewCheatle 06-19-2013 11:18 AM

Hi,

Brilliant plugin.

Has anyone had problems with cookies. Basically when I use the hook and tick the 'Remember Me' box it doesn't remember me when I close the browser and relaunch it. If I disable the hook it works. Any idea how to fix this.

Thank you.


All times are GMT. The time now is 01:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01320 seconds
  • Memory Usage 1,831KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete