LDAP --> ADS Anbindung

Hilfe zu Znuny Problemen aller Art
Locked
HF_Dave
Znuny newbie
Posts: 7
Joined: 06 Jun 2011, 13:55
Znuny Version: 2.3.4

LDAP --> ADS Anbindung

Post by HF_Dave »

Hi

habe hier einige Probleme mit meiner LDAP --> ADS Anbindung
Vielleicht hat ja einer Zeit mir zu helfen.

SYS Log
Tue Jun 21 11:57:53 2011 notice OTRS-CGI-50 User: OTRS_LDAP sync failed, no LDAP entry found!BaseDN='cn=users,dc=ems,dc=local', Filter='(uid=OTRS_LDAP)', (REMOTE_ADDR: 10.12.12.45).
Tue Jun 21 11:57:53 2011 notice OTRS-CGI-50 User: OTRS_LDAP authentication ok (REMOTE_ADDR: 10.12.12.yy).
Tue Jun 21 11:57:53 2011 notice OTRS-CGI-50 User: OTRS_LDAP sync failed, no LDAP entry found!BaseDN='cn=users,dc=ems,dc=local', Filter='(uid=OTRS_LDAP)', (REMOTE_ADDR: 10.12.12.45).
Tue Jun 21 11:57:53 2011 error OTRS-CGI-50 First bind failed! Invalid credentials
Tue Jun 21 11:57:53 2011 notice OTRS-CGI-50 User: OTRS_LDAP authentication ok (REMOTE_ADDR: 10.12.12.yy).
Tue Jun 21 11:57:53 2011 error OTRS-CGI-50 First bind failed! Invalid credentials
Tue Jun 21 11:57:53 2011 notice OTRS-CGI-50 User: OTRS_LDAP sync failed, no LDAP entry found!BaseDN='cn=users,dc=ems,dc=local', Filter='(uid=OTRS_LDAP)', (REMOTE_ADDR: 10.12.12.45).
Tue Jun 21 11:57:53 2011 notice OTRS-CGI-50 User: OTRS_LDAP authentication ok (REMOTE_ADDR: 10.12.12.yy).
Tue Jun 21 11:57:53 2011 error OTRS-CGI-50 First bind failed! Invalid credentials
Tue Jun 21 11:57:53 2011 notice OTRS-CGI-50 User: OTRS_LDAP sync failed, no LDAP entry found!BaseDN='cn=users,dc=ems,dc=local', Filter='(uid=OTRS_LDAP)', (REMOTE_ADDR: 10.12.12.45).
Tue Jun 21 11:57:53 2011 notice OTRS-CGI-50 User: OTRS_LDAP authentication ok (REMOTE_ADDR: 10.12.12.yy).

ldapsearch
SASL/GSSAPI authentication started
ldap_sasl_interactive_bind_s: Local error (-2)
additional info: SASL(-1): generic failure: GSSAPI Error: Miscellaneous failure (see text) (open(/tmp/krb5cc_0): No such file or directory)


Config.pm
#LDAP Anbindung#


#This is an example configuration for an LDAP auth. backend.
# (take care that Net::LDAP is installed!)
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'svcladc1.ems.local';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=ems,dc=local';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';

#----------------------------------------------------------------#


# Check if the user is allowed to auth in a posixGroup
# (e. g. user needs to be in a group xyz to use otrs)
$Self->{'AuthModule::LDAP::GroupDN'} = 'OU=VW,OU=Benutzer,OU=Stadt 1,OU=123,DC=ems,DC=local';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
# for ldap posixGroups objectclass (just uid)
$Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
# for non ldap posixGroups objectclass (with full user dn)
$Self->{'AuthModule::LDAP::UserAttr'} = 'CN=OTRS\,LDAP,OU=VW,OU=Benutzer,OU=Stadt 1,OU=123,DC=ems,DC=local';

#----------------------------------------------------------------#

# The following is valid but would only be necessary if the
# anonymous user do NOT have permission to read fromdthe LDAP tree
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=OTRS\,LDAP,OU=VW,OU=Benutzer,OU=Stadt 1,OU=123,DC=ems,DC=local';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'Passwort';

#----------------------------------------------------------------#

# In case you want to convert all given usernames to lower letters you
# should activate this option. It might be helpfull if databases are
# in use that do not distinguish selects for upper and lower case letters
# (Oracle, postgresql). User might be synched twice, if this option
# is not in use.
$Self->{'AuthModule::LDAP::UserLowerCase'} = 0;

#----------------------------------------------------------------#

# In case you need to use OTRS in iso-charset, you can define this
# by using this option (converts utf-8 data from LDAP to iso).
$Self->{'AuthModule::LDAP::Charset'} = 'iso-8859-1';

#----------------------------------------------------------------#

# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
$Self->{'AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};

# Die if backend can't work, e. g. can't connect to server.
$Self->{'AuthModule::LDAP::Die'} = 1;

$Self->{'UserSyncLDAPMap1'} = {
'UserEmail' => 'mail',
'UserFirstname' => 'givenName',
'UserLastname' => 'sn',
'UserLogin' => 'sAMAccountName'
};

#----------------------------------------------------------------#
# Hier ENDE #

Benutzer OTRS_LDAP existier, Group und FQDN hab ich mit gpresult ermittelt.
Müsste dementspreched stimmen.

Mein großes Problem ist halt der SLAPD,da ich hier absolut keine Ahnung von hab.
Soweit...
Besten Dank
-------------------------------------------------
Produktiv: OTRS: 3.0.10, OTRS::ITSM 3.0.5
Auf debian
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: LDAP --> ADS Anbindung

Post by ferrosti »

Google mal nach der krb5.keytab file.
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
Martis
Znuny newbie
Posts: 18
Joined: 07 Jan 2011, 13:39
Znuny Version: 30900

Re: LDAP --> ADS Anbindung

Post by Martis »

Verbinde mal auf den Port 3268 deines Domänencontrollers. Auf dem Port 3268 (bzw. 3269 mit SSL) liegt der globale Katalog.
Wenn man auf den Standardport (389) verbindet, kann es sein, dass er nur einen Teil oder garkeine User bei der Suche findet.

$Self->{'AuthModule::LDAP::Host'} = 'svcladc1.ems.local:3268';

$Self->{'AuthModule::LDAP::Params'} = {
port => 3268,
timeout => 120,
async => 0,
version => 3,
};

Ich würde auch das LDAP Params evtl mal weglassen und schauen ob es dann geht.

Gib bescheid, ob das funktioniert oder auch nicht :-)

Gruß
David
Last edited by Martis on 07 Jul 2011, 14:36, edited 1 time in total.
PLease delete this account :-) Thx
wthk
Znuny newbie
Posts: 10
Joined: 23 Jun 2011, 12:27
Znuny Version: 3.0.8

Re: LDAP --> ADS Anbindung

Post by wthk »

Bei meinem System gab's zwei Stolpersteine, bevor die LDAP-Anbindung lief:
a) das Modul perl-LDAP musst noch installiert werden
b) ich musste die Bind credentials von CN auf distinguished name umstellen (user@yourdomain.local)

Danach konnte ich LDAP nutzen - die Benutzernamen müssen allerdings in OTRS angelegt sein.
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: LDAP --> ADS Anbindung

Post by ferrosti »

Wenn Du den AuthSync Part mit einbindest, dann musst Du auch die User nicht erst in der internen DB anlegen!
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
wthk
Znuny newbie
Posts: 10
Joined: 23 Jun 2011, 12:27
Znuny Version: 3.0.8

Re: LDAP --> ADS Anbindung

Post by wthk »

Hm,

interessanter Hinweis, danke! Ist das in der Doku/Wiki mit beschrieben?
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: LDAP --> ADS Anbindung

Post by ferrosti »

Sowohl, als auch :D
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
wthk
Znuny newbie
Posts: 10
Joined: 23 Jun 2011, 12:27
Znuny Version: 3.0.8

Re: LDAP --> ADS Anbindung

Post by wthk »

Den Part hatte ich bereits in meiner Konfig (hätt mich auch gewundert, wenn ich das übersehen hätte - steht ja direkt im gleichen Kapitel)...
War allerdings noch ein Tippfehler drin, mal sehen, ob's jetzt funktioniert...

Hm, leider nein:

Code: Select all

"Panic, user authenticated but no user data can be found in OTRS DB!! Perhaps the user is invalid."
Nachdem, was ich hier in anderen Threads gelesen habe, muss für die Agents aber immer ein Konto in der DB angelegt werden?

[UPDATE]
Für das Konto war keine eMail-Adresse angelegt - jetzt funktioniert es!
HF_Dave
Znuny newbie
Posts: 7
Joined: 06 Jun 2011, 13:55
Znuny Version: 2.3.4

Re: LDAP --> ADS Anbindung

Post by HF_Dave »

Bedankt für Hilfe ect.

Sind auf 3.0.8 gegangen und alles läuft wunderbar.

@ferrosti ja hast recht. hatte DB und LDAP Anbindung zusammen in der config.pm
Der DB Part wurde von mir dann aber auskommentiert.

Euch einen schöne Restwoche noch
-------------------------------------------------
Produktiv: OTRS: 3.0.10, OTRS::ITSM 3.0.5
Auf debian
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: LDAP --> ADS Anbindung

Post by ferrosti »

Die 3.0.9 ist draußen, die solltest Du noch mitnehmen, solange Du noch warm bist :)
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
Locked