[SOLVED] AD Agent group membership.

Moderator: crythias

Locked
Kris
Znuny newbie
Posts: 49
Joined: 28 Mar 2013, 13:02
Znuny Version: 3.2.3
Real Name: Kris ten Hoedt
Company: Prominent

[SOLVED] AD Agent group membership.

Post by Kris »

Hi again,

I got LDAP working.
However, now all users can login to the admin area, so I figured I create group 'otrsagent' in AD and put all the techies in there.

I changed my config.pm like this:

Code: Select all

    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'dc.mycompany.com';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=mycompany,dc=com';
    $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'AuthModule::LDAP::AlwaysFilter'} = '(objectclass=user)';
    $Self->{'AuthModule::LDAP::GroupDN'} = 'CN=otrsagent,OU=Users,DC=mycompany,DC=com';
    $Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUID';
    $Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'user';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = 'password';
But I can't login. I get the following error when I try:

Code: Select all

[Thu Mar 28 16:02:39 2013][Error][Kernel::System::Auth::LDAP::Auth][276] Search failed! base='CN=otrsagent,OU=Users,DC=mycompany,DC=com', filter='(memberUID=kthoedt)', 0000208D: NameErr: DSID-0310020A, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=mycompany,DC=com'

Am I doing something wrong?
Last edited by Kris on 29 Mar 2013, 13:25, edited 1 time in total.
Version: OTRS 3.2.3 + ITSM
OS: Win XP Pro SP3
DB: MySQL
Webserver: Apache
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: AD Agent group membership.

Post by crythias »

check case memberUID vs memberUid
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Kris
Znuny newbie
Posts: 49
Joined: 28 Mar 2013, 13:02
Znuny Version: 3.2.3
Real Name: Kris ten Hoedt
Company: Prominent

Re: AD Agent group membership.

Post by Kris »

Thanks. Still no luck though... :(

Code: Select all

[Fri Mar 29 08:06:48 2013][Error][Kernel::System::Auth::LDAP::Auth][276] Search failed! base='CN=otrsagent,OU=Users,DC=mycompany,DC=com', filter='(memberUid=kthoedt)', 0000208D: NameErr: DSID-0310020A, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=mycompany,DC=com'
It's a W2K8 R2 DC btw....
Version: OTRS 3.2.3 + ITSM
OS: Win XP Pro SP3
DB: MySQL
Webserver: Apache
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: AD Agent group membership.

Post by jojo »

Code: Select all

    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'dc.mycompany.com';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=mycompany,dc=com';
    $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'AuthModule::LDAP::AlwaysFilter'} = '(objectclass=user)';
    $Self->{'AuthModule::LDAP::GroupDN'} = 'CN=otrsagent,OU=Users,DC=mycompany,DC=com';
    $Self->{'AuthModule::LDAP::AccessAttr'} = '[color=#FF0000]member[/color]';
    $Self->{'AuthModule::LDAP::UserAttr'} = '[color=#FF0000]DN[/color]';
    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'user';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = 'password';

If member does not work, use memberof
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Kris
Znuny newbie
Posts: 49
Joined: 28 Mar 2013, 13:02
Znuny Version: 3.2.3
Real Name: Kris ten Hoedt
Company: Prominent

Re: AD Agent group membership.

Post by Kris »

Thanks, but still no joy I'm affraid....

Code: Select all

[Fri Mar 29 09:30:10 2013][Error][Kernel::System::Auth::LDAP::Auth][276] Search failed! base='CN=otrsagent,OU=Users,DC=mycompany,DC=com', filter='(memberof=kthoedt)', 0000208D: NameErr: DSID-0310020A, problem 2001 (NO_OBJECT), data 0, best match of:
	'DC=mycompany,DC=com'

[Fri Mar 29 09:33:12 2013][Error][Kernel::System::Auth::LDAP::Auth][276] Search failed! base='CN=otrsagent,OU=Users,DC=mycompany,DC=com', filter='(memberof=CN=Kris ten Hoedt,OU=ICT,OU=Energieweg,OU=Users,OU=mycompany,DC=mycompany,DC=com)', 0000208D: NameErr: DSID-0310020A, problem 2001 (NO_OBJECT), data 0, best match of:
	'DC=mycompany,DC=com'

[Fri Mar 29 09:34:47 2013][Error][Kernel::System::Auth::LDAP::Auth][276] Search failed! base='CN=otrsagent,OU=Users,DC=mycompany,DC=com', filter='(member=CN=Kris ten Hoedt,OU=ICT,OU=Energieweg,OU=Users,OU=mycompany,DC=mycompany,DC=com)', 0000208D: NameErr: DSID-0310020A, problem 2001 (NO_OBJECT), data 0, best match of:
	'DC=mycompany,DC=com'

[Fri Mar 29 09:37:09 2013][Error][Kernel::System::Auth::LDAP::Auth][276] Search failed! base='CN=otrsagent,OU=Users,DC=mycompany,DC=com', filter='(memberUid=CN=Kris ten Hoedt,OU=ICT,OU=Energieweg,OU=Users,OU=mycompany,DC=mycompany,DC=com)', 0000208D: NameErr: DSID-0310020A, problem 2001 (NO_OBJECT), data 0, best match of:
	'DC=mycompany,DC=com'
Version: OTRS 3.2.3 + ITSM
OS: Win XP Pro SP3
DB: MySQL
Webserver: Apache
mittfran
Znuny newbie
Posts: 9
Joined: 18 Feb 2013, 15:29
Znuny Version: 3.3.7

Re: AD Agent group membership.

Post by mittfran »

$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';

check again!

regards mittfran
Kris
Znuny newbie
Posts: 49
Joined: 28 Mar 2013, 13:02
Znuny Version: 3.2.3
Real Name: Kris ten Hoedt
Company: Prominent

Re: AD Agent group membership.

Post by Kris »

Been there, done that...
Still:

Code: Select all

[Fri Mar 29 10:41:31 2013][Error][Kernel::System::Auth::LDAP::Auth][276] Search failed! base='CN=otrsagent,OU=Users,DC=mycompany,DC=com', filter='(member=CN=Kris ten Hoedt,OU=ICT,OU=Energieweg,OU=Users,OU=mycompany,DC=mycompany,DC=com)', 0000208D: NameErr: DSID-0310020A, problem 2001 (NO_OBJECT), data 0, best match of:
	'DC=mycompany,DC=com'
Version: OTRS 3.2.3 + ITSM
OS: Win XP Pro SP3
DB: MySQL
Webserver: Apache
mittfran
Znuny newbie
Posts: 9
Joined: 18 Feb 2013, 15:29
Znuny Version: 3.3.7

Re: AD Agent group membership.

Post by mittfran »

Either your DN is wrong or you have serious problems with your active directory.
Check the group DN if it is correct.

regards mittfran
Kris
Znuny newbie
Posts: 49
Joined: 28 Mar 2013, 13:02
Znuny Version: 3.2.3
Real Name: Kris ten Hoedt
Company: Prominent

Re: AD Agent group membership.

Post by Kris »

DN is copied from adsiedit. No room for typo's there.... :-)
I've tried other groups as well, they all give the same result.
Still seems like some syntax thingy to me.

And other than that, I don't think I have any AD issues whatsoever. Well not that I know of anyways hehehe
Version: OTRS 3.2.3 + ITSM
OS: Win XP Pro SP3
DB: MySQL
Webserver: Apache
Kris
Znuny newbie
Posts: 49
Joined: 28 Mar 2013, 13:02
Znuny Version: 3.2.3
Real Name: Kris ten Hoedt
Company: Prominent

Re: [SOLVED] AD Agent group membership.

Post by Kris »

OK, my bad.
It seems I didn't copy the group DN after all. Must have been something else I copied then....

It was like this:
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=otrsagent,OU=Users,DC=mycompany,DC=com';

But ofcourse "Users" is a default container, not an OU.

So after changing it to
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=otrsagent,CN=Users,DC=mycompany,DC=com';

all works fine now.

Sorry for being stubborn :oops:

And thanks for reminding me to "read" instead of just "do" :wink:

Just for the records, the section looks like this now:

Code: Select all

# Enable LDAP lookups for Agent logins. Must be meber of "otrsagent" group
    $Self->{'AuthModule'}                                  = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'}                      = 'dc02.mycompany.com;
    $Self->{'AuthModule::LDAP::BaseDN'}                    = 'dc=mycompany,dc=com';
    $Self->{'AuthModule::LDAP::UID'}                       = 'sAMAccountName';
    $Self->{'AuthModule::LDAP::AlwaysFilter'}              = '(objectclass=user)';
    $Self->{'AuthModule::LDAP::GroupDN'}                   = 'CN=otrsagent,CN=Users,DC=mycompany,DC=com';
    $Self->{'AuthModule::LDAP::AccessAttr'}                = 'member';
    $Self->{'AuthModule::LDAP::UserAttr'}                  = 'DN';
    $Self->{'AuthModule::LDAP::SearchUserDN'}              = 'CN=ldap,CN=Users,DC=mycompany,DC=com';
    $Self->{'AuthModule::LDAP::SearchUserPw'}              = 'password';
Version: OTRS 3.2.3 + ITSM
OS: Win XP Pro SP3
DB: MySQL
Webserver: Apache
Locked