Again about LDAP and other authentication / user storage modules

ILink

Joined: 2008-06-12
Posts: 4
Posted: Thu, 2008-06-12 19:45

Hi all,

We have a LDAP server in our company which stores user logins, passwords and their emails.
I need to use this info. In fact I need to use it instead of g2_User table.
But it seems that I cannt do it because of other stuff which reffers to users by their IDs in this table.
So I have two methods to solve this issue:

* Create synchronizer which will export data from our LDAP to gallery on regular basis (ugly method)
* Make some dirty hacks in gallery to force it to use LDAP.

Please tell me:

* There is no way to create module for gallery to use passwords and emails from external system. Am I right?
* What else can I do solve my promlem in elegant way?

Thanks.

 
ILink

Joined: 2008-06-12
Posts: 4
Posted: Thu, 2008-06-12 19:49

By the way, there is a unique user id (numeric) in our LDAP, probably I can use it, but do I have to hack the system for it?

 
ckdake
ckdake's picture

Joined: 2004-02-18
Posts: 2258
Posted: Thu, 2008-06-12 21:57

Heres one example of a way to do this:

http://codex.gallery2.org/LDAP_authentication

____
http://ckdake.com/ - If you found my help useful, please consider donating to Gallery.

 
ILink

Joined: 2008-06-12
Posts: 4
Posted: Mon, 2008-06-16 10:30

But it assumes that all users exists in database, right?
It is a little bit strange - to have all users in db if they also exist in LDAP, is not it?

 
ILink

Joined: 2008-06-12
Posts: 4
Posted: Wed, 2008-07-02 20:52

I've done it.
Here comes two things:
1) PHP script, which synchronizes DB with LDAP
2) Dirty hack, which helps gallery to authenticate users by LDAP

It works in my network.

 
rbonafied

Joined: 2004-08-14
Posts: 8
Posted: Wed, 2008-12-24 14:05

Hi,

Just a few questions about the files in the attachment:

1) With respect to the Gallery software tree, where does 'SqlLdapSync.php' go?
2) Does 'SqlLdapSync.php' get called by each user when they login or is it somehow executed externally?
3) Do you know if these mods will work in Gallery 2.3?

Many thanks,
R