ldapauth plugin -- can't update options

486 views
Skip to first unread message

Karen

unread,
Mar 17, 2010, 1:51:48 PM3/17/10
to ResourceSpace
Hello,

I'd like to try the ldapauth plugin but am having trouble configuring
it. I activate it, then click options which brings up the setup.php
correctly, but there's no way to save the configuration. Any
suggestions?

Thanks.
Karen

Jeff Harmon

unread,
Mar 17, 2010, 3:02:18 PM3/17/10
to ResourceSpace
Doesn't the plugin have a config file in its folder you can edit
directly? Maybe try that? INTEGRATION WITH THE PLUGIN MANAGER COULD BE
oops Iphone caps lock! ... At play here.

-Jeff Harmon
Colorhythm LLC

Karen

unread,
Mar 17, 2010, 4:30:12 PM3/17/10
to ResourceSpace
Thanks, Jeff. You're brave to actually post to this group from your
iPhone!

Anyway, I did try editing the config file in its folder but it doesn't
seem to do anything with it. I searched the plugin folder for
references to config.php and there were none, so I'm guessing that the
plugin is halfway between using the plugin manager and not.

> > Karen- Hide quoted text -
>
> - Show quoted text -

Jeff Harmon

unread,
Mar 17, 2010, 6:58:41 PM3/17/10
to ResourceSpace
Sorry I couldn't be more helpful; we don't actually use that plug-in
personally.

- Jeff Harmon
Colorhythm LLC

Rene Caron

unread,
Mar 17, 2010, 7:40:38 PM3/17/10
to resour...@googlegroups.com
Hi Karen

We also we try to use this plugin for some time but without results. If we find we will keep you informed. And if your side you found a solution we would be interested to know the result.


As soon I hope


2010/3/17 Karen <ccu...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To post to this group, send email to resour...@googlegroups.com.
To unsubscribe from this group, send email to resourcespac...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/resourcespace?hl=en.


Karen

unread,
Mar 18, 2010, 3:06:43 PM3/18/10
to ResourceSpace
Hi Rene,

For what its worth, I found a typo (repeated several times) in the
plugin, though I still don't have it working yet. If you want to try
on your system, these are the changes I made:

In hooks/all.php:
line 8 and 9: change $use_plugin_manager to $use_plugins_manager

In config/config.php
line 109: same change

These changes will affect your results if you are *not* using the
plugin manager.

Let me know if you have any luck.

Regards,
Karen

Karen

unread,
Mar 18, 2010, 3:26:47 PM3/18/10
to ResourceSpace
UPDATE: Got it working!!!!

Tech Patriot

unread,
Apr 6, 2010, 3:50:55 PM4/6/10
to ResourceSpace
Hi Karen,

Would you mind posting your configuration or experience with this
plugin? I'm about to head into using the plugin myself and am
wondering if you have any tips to share.

Thanks,
John

Karen

unread,
Apr 7, 2010, 1:50:52 PM4/7/10
to ResourceSpace
Hi John,

Sure. Firstly, I was not able to get the plugin working using the
plugin manager; i.e. I had to disable the plugin manager entirely, as
the code for this in the plugin seems to be incomplete. Also, FYI, our
ldap is running active directory (AD).

I made these changes (shown in my post above):

In hooks/all.php:
line 8 and 9: change $use_plugin_manager to $use_plugins_manager
In config/config.php
line 109: same change

In config.php lines 111-120 are as follows:

$ldapauth['ldapserver'] = 'ldap://<address of ldap server>';
$ldapauth['port'] = NULL;
$ldapauth['rootdn']= '<domain>/<username of read-only ldap user>';
$ldapauth['rootpass']= '<password of read-only ldap user>';
$ldapauth['basedn']= '<base dn of my ldap/ad server>';
$ldapauth['loginfield'] = 'samaccountname';
$ldapauth['usersuffix'] = '';
$ldapauth['createusers'] = true;
$ldapauth['groupbased'] = false;
$ldapauth['newusergroup'] = <the group number to be assigned to new
users>;
}

I hope that helps.

Regards,
Karen

Tech Patriot

unread,
Apr 7, 2010, 2:23:37 PM4/7/10
to ResourceSpace
Awesome! Thanks very much Karen.

I'm using Active Directory also, so this should work great.

Basically, I'm going to do the following then:

1. Extract the contents of the RSP file to an LDAPAUTH folder.
2. Copy that folder to the ResourceSpace plugins folder.
3. Make the edits to hooks/all.php
4. Rename or copy config/config.default.php to config.php
5. Make the edits to config/config.php
6. Activate the plugin via resourcespace/include/config.php using
$plugins=array("ldapauth");

You mentioned that you had to turn off the plugin manager entirely in
RS? Does that mean you set the $use_plugins_manager = false; command
in resourcespace/include/config.php?

I'm assuming I would just activate the other plugins I had originally
activated via plugin manager using the config.php $plugins=array
instead. Please let me know if I'm wrong.

Thanks again for the feedback!
John

Karen

unread,
Apr 7, 2010, 4:01:40 PM4/7/10
to ResourceSpace
Yep, everything you said sounds right. Good luck!

Karen

jledhead

unread,
May 18, 2010, 4:06:21 PM5/18/10
to ResourceSpace
I am having no luck getting this working. I am also not seeing any
errors either on my apache logs, or in my DC logs. local
authentication still works. Let me know what information you need
from me. Thanks.
> > >ldapis running active directory (AD).
>
> > > I made these changes (shown in my post above):
>
> > > In hooks/all.php:
> > > line 8 and 9: change $use_plugin_manager to $use_plugins_manager
> > > In config/config.php
> > > line 109: same change
>
> > > In config.php lines 111-120 are as follows:
>
> > > $ldapauth['ldapserver'] = 'ldap://<address ofldapserver>';
> > > $ldapauth['port'] = NULL;
> > > $ldapauth['rootdn']= '<domain>/<username of read-onlyldapuser>';
> > > $ldapauth['rootpass']= '<password of read-onlyldapuser>';
> > > $ldapauth['basedn']= '<base dn of myldap/ad server>';
> > > $ldapauth['loginfield'] = 'samaccountname';
> > > $ldapauth['usersuffix'] = '';
> > > $ldapauth['createusers'] = true;
> > > $ldapauth['groupbased'] = false;
> > > $ldapauth['newusergroup'] = <the group number to be assigned to new
> > > users>;
>
> > > }
>
> > > I hope that helps.
>
> > > Regards,
> > > Karen

jledhead

unread,
May 25, 2010, 1:17:37 PM5/25/10
to ResourceSpace
for completeness, I have this working and its working great. For me
the problem was not reading directions. I have connected using ldap
before so glossed over that the basedn can't be the root. I did all
the above (like disabling plugin manager) and here is my config
(sanitized):
$ldapauth['ldapserver'] = 'f.q.d.n';
$ldapauth['port'] = NULL;
$ldapauth['rootdn']= 'user...@f.q.d.n.';
$ldapauth['rootpass']= 'password';
$ldapauth['basedn']= 'OU=departments,DC=fq,DC=d,DC=n';
$ldapauth['loginfield'] = 'samaccountname';
$ldapauth['usersuffix'] = 'DOMAIN';
$ldapauth['createusers'] = true;
$ldapauth['groupbased'] = false;
$ldapauth['newusergroup'] = '2';
}
?>

Tech Patriot

unread,
Jun 29, 2010, 2:30:31 PM6/29/10
to ResourceSpace
Thanks for sharing. Between Karen's and Jason's config I was able to
figure this out and have it working.

One thing that got me hung up was the fact that I did not have
php_ldap.dll installed or enabled as a result of using the Windows
installer version of PHP. I needed to download the ZIP version and
extract the php_ldap.dll manually as well as update my php.ini file.

Also, if you are happy with RS just storing/using the Windows user
name without any suffix the usersuffix variable can be set to NULL, as
in:

$ldapauth['usersuffix'] = NULL;

Thanks,
John


On May 25, 12:17 pm, jledhead <ledfordja...@gmail.com> wrote:
> for completeness, I have this working and its working great.  For me
> the problem was not reading directions.  I have connected usingldap
> before so glossed over that the basedn can't be the root.  I did all
> the above (like disabling plugin manager) and here is my config
> (sanitized):
> $ldapauth['ldapserver'] = 'f.q.d.n';
> $ldapauth['port'] = NULL;
> $ldapauth['rootdn']= 'usern...@f.q.d.n.';

Peter P.

unread,
Jun 30, 2010, 3:49:02 PM6/30/10
to ResourceSpace
Hi All,

Thanks to this discussion, I was able to successfully (at least
partially) to install the plugin. However, I get the following System
error upon successful user authentication:

resourceSpace/plugins/ldapauth/hooks/all.php line 28: Undefined index:
distinguishedname

I'm not quite sure where to start looking for potential problems.
I'll be very grateful for any suggestions.

Tech Patriot

unread,
Jul 1, 2010, 10:52:52 AM7/1/10
to ResourceSpace
Hi,

It seems it has a problem with the basedn variable specified in the
resourcespace\plugins\ldapauth\config\config.php file. Either it is
missing or incorrect.

However, you are able to login? Does a new user entry appear in Team
Center for a first-time login?

Thanks,
John

Peter P.

unread,
Jul 5, 2010, 9:17:06 AM7/5/10
to ResourceSpace
Hi John,
The system does seem to authenticate as providing an invalid password
generates the "Sorry, your login details were incorrect" message.
However, correct credentials give me the error I described. Our ldap
server allows anonymous connections, so I'm setting both "rootdn" and
"rootpass" as NULL.

Setting the "rootdb" variable on the other hands, generates
"Inappropriate authentication," which I'm assuming is because it's
expecting a non-null value for "rootpass."

I've also contacted the developed of the plugin and will update this
group if we get anywhere :)

Peter

Tech Patriot

unread,
Jul 6, 2010, 12:42:26 PM7/6/10
to ResourceSpace
What if you delete (or comment out) these two lines altogether:

$ldapauth['rootdn']=
$ldapauth['rootpass']=

The author wrote "distinguishedName of a user allowed to browse LDAP
(for non-anonymous binds)" in the comments for rootdn as if it should
not be used for anonymous binds.

Thanks,
John
Message has been deleted

Peter P.

unread,
Jul 9, 2010, 9:12:14 AM7/9/10
to ResourceSpace
Just an update on my progress: I was able to make it work! The
"distinguishedname" value refers to actual LDAP CN attribute, which in
this case our server did not support. I've replaced line 28 with the
following to make it work:
$user_cn = "uid=".$uname.",ou=People,o=mydomain.ca";

This was also causing errors on line 37:
[$sr = ldap_search($ds,$ldapauth['basedn'],"distinguishedname=".
$user_cn);]
The following tweak rectified it:
$sr = ldap_search($ds,"ou=People,o=mydomain.ca","uid=".$uname);

I hope this helps out someone in the future!

Best,
Peter

Ajjawi

unread,
Jun 22, 2012, 4:10:18 PM6/22/12
to resour...@googlegroups.com
i have followed all the steps and dont have any problem

1.  Extract the contents of the RSP file to an LDAPAUTH folder.
2.  Copy that folder to the ResourceSpace plugins folder.

3.  Rename or copy config/config.default.php to config.php
4.  Make the edits to config/config.php
5.  Activate the plugin via resourcespace/include/config.php using
$plugins=array("ldapauth");

execpt at editing  hooks/all.php

as you mentioned previously change In hooks/all.php:
line 8 and 9: change $use_plugin_manager to $use_plugins_manager,but i don't have what you mentioned

Regards

Reply all
Reply to author
Forward
0 new messages