Multiple LDAP Groups

Moderator: crythias

Locked
rtorres
Znuny newbie
Posts: 50
Joined: 24 Feb 2012, 21:51
Znuny Version: 31100

Multiple LDAP Groups

Post by rtorres »

I have everything working but I am cunfused about how to make the system grab users from 2 different groups. I have been reading the documentation on how to do this:
If you have users in multiple containers, you may want to add multiple LDAP sources. Feel free to use $Self->{CustomerUser1} throughout $Self->{CustomerUser10}.
The code with # & bolded are the ones I have been trying to get to work in conjuction..
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = '<IP>';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'OU=Users,OU=Users,DC=XXX,DC=XXX,DC=XXX';
#$Self->{'Customer1::AuthModule::LDAP::BaseDN'} = 'OU=Test,OU=XXX,DC=XXX,DC=XXX,DC=XXX';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'CN=User,OU=Users,OU=User,DC=XXX,DC=XXX,DC=XXX';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = '<password>';
$Self->{CustomerUser} = {
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => '<IP>',
BaseDN => 'OU=Users,OU=XXX,DC=XXX,DC=XXX,DC=XXX',
#BaseDN => 'OU=Test,OU=XXX,DC=XXX,DC=XXX,DC=XXX',
SSCOPE => 'sub',
UserDN => 'CN=User,OU=Users,OU=XXX,DC=XXX,DC=XXX,DC=XXX',
UserPw => '<password>',
Steer me in the right direction someone please?
artjoms15
Znuny advanced
Posts: 121
Joined: 30 Aug 2011, 10:48
Znuny Version: 3.3.8 && 4.0.9
Real Name: Artjoms Petrovs
Location: Latvia

Re: Multiple LDAP Groups

Post by artjoms15 »

Hello!
Uhmm... may I ask why you have mixed this solution from few files or forum posts?

Okee.. here is what you should do -

a) make its own authenticator for each LDAP backend

e.g.

Code: Select all

$Self->{'CustomerONE::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'CustomerONE::AuthModule::LDAP::Host'} = '<IP>';
$Self->{'CustomerONE::AuthModule::LDAP::BaseDN'} = 'xxx'
...
$Self->{'CustomerTWO::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'CustomerTWO::AuthModule::LDAP::Host'} = '<IP>';
$Self->{'CustomerTWO::AuthModule::LDAP::BaseDN'} = 'xxx'

...
That should work for you ;) But please, read the admin manual, it is not that difficult to find a solution in there :D
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
rtorres
Znuny newbie
Posts: 50
Joined: 24 Feb 2012, 21:51
Znuny Version: 31100

Re: Multiple LDAP Groups

Post by rtorres »

Fresh look I was missing the second customer1. Thanks again :)
Locked