Anmeldung an einem Active Directory

Hilfe zu OTRS Problemen aller Art
Post Reply
Woddi
Znuny newbie
Posts: 23
Joined: 02 Aug 2007, 15:24
Znuny Version: 2.4.5

Anmeldung an einem Active Directory

Post by Woddi »

Hallo,

kann mir jemand sagen wie ich es schaffe mit dem otrs 2.2.3 mich an einem AD anzumelden?
Ich habe Debian etch installiert. Soweit läuft otrs auch ganz gut nur möchte ich gerne meine Benutzer über den AD anmelden lassen, da ich nicht übermäßig viele Passwörter speichern möchte.

Vielen Dank schonmal für die Infos!
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Anmeldung an einem Active Directory

Post by jojo »

Forumssuche nutzen....

und/Oder in die Defaults.pm schauen
"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
Woddi
Znuny newbie
Posts: 23
Joined: 02 Aug 2007, 15:24
Znuny Version: 2.4.5

Anmeldung an einem Active Directory

Post by Woddi »

so,

habe nun kerberos5 und samba installiert und ich kann mich mit

Code: Select all

wbinfo -u
die Users im AD anzeigen lassen. Denke nun mal das eine Verbindung besteht.
Jetzt hab ich mich im otrs Forum schlau gemacht, wie die Config aussehen muss damit sich ein otrs mit dem AD verbindet:

Code: Select all

#LDAP Konfiguration
# ADS Connect
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = '192.168.12.1';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=proveit,dc=test,dc=local';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::GroupDN'} = 'DC=PROVEITEST'; 
$Self->{'AuthModule::LDAP::AccessAttr'} = '';  (<- Was muss denn hier rein?)
$Self->{'AuthModule::LDAP::SearchUserDN'} = ''; (<- Was muss denn hier rein?)
$Self->{'AuthModule::LDAP::SearchUserPw'} = ''; (<- Was muss denn hier rein?)

#### UserSyncLDAPMap
    # (map if agent should create/synced from LDAP to DB after login)
    $Self->{UserSyncLDAPMap} = {
#       # DB -> LDAP
        UserFirstname => 'givenName',
        UserLastname => 'sn',
        UserEmail => 'mail',
    };  

#LDAP Konfiguration Ende
unter var/log/syslog finde ich folgende ausgabe wenn ich mit einem benutzer der im AD vorhanden ist verbinden will:

Code: Select all

Oct 17 14:24:06 otrs2 OTRS-CGI-01[3351]: [Error][Kernel::System::Auth::LDAP::Auth][Line:248]: Search failed! base='DC=PROVEITEST', filter='(memberUid=CN=otrstest,CN=Users,DC=proveit,DC=test,DC=local)', Success
Hat jemand ne Ahnung was die Sachen noch bedeuten?
Debian etch / Apache 2.2 / Postfix / OTRS 2.4.5 / ITSM 1.3.2
chrim
Znuny newbie
Posts: 13
Joined: 26 Sep 2007, 09:45

Anmeldung an einem Active Directory

Post by chrim »

#LDAP Konfiguration
# ADS Connect
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = '192.168.12.1';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=proveit,dc=test,dc=local';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::GroupDN'} = 'DC=PROVEITEST';
$Self->{'AuthModule::LDAP::AccessAttr'} = ''; (<- Was muss denn hier rein?) 'member'
$Self->{'AuthModule::LDAP::SearchUserDN'} = ''; (<- Was muss denn hier rein?) gültiger Benutzer aus dem AD. Ein dummy oder serviceuser der nur für solche lesende Zugriffe genutzt wird (AD erlaubt, glaube ich, keine anonymen Zugriffe.)
$Self->{'AuthModule::LDAP::SearchUserPw'} = ''; (<- Was muss denn hier rein?) Das Passwort von den oben erwähnten User

#### UserSyncLDAPMap
# (map if agent should create/synced from LDAP to DB after login)
$Self->{UserSyncLDAPMap} = {
# # DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
vielleicht noch :
Phone => 'telephoneNumber',
Username => 'sAMAccountName', oder wie du willst
comment => 'description',

};

#LDAP Konfiguration Ende
Woddi
Znuny newbie
Posts: 23
Joined: 02 Aug 2007, 15:24
Znuny Version: 2.4.5

Anmeldung an einem Active Directory

Post by Woddi »

So mal meine entgültige Konfiguration.

#LDAP Konfiguration
# ADS Connect
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'IPAddresse';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=example,dc=test,dc=local';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=otrs,CN=USERS,DC=example,DC=test,DC=local';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=Administrator,CN=USERS,DC=example,DC=test,DC=local';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'PW VON Administrator';

#### UserSyncLDAPMap
# (map if agent should create/synced from LDAP to DB after login)
$Self->{UserSyncLDAPMap} = {
# # DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
Phone => 'telephoneNumber',
Username => 'sAMAccountName',
comment => 'description',
};

#LDAP Konfiguration Ende

Soweit passt alles. es werden nun nur die Users zugelassen die im AD auch in der gruppe otrs sind.
Debian etch / Apache 2.2 / Postfix / OTRS 2.4.5 / ITSM 1.3.2
chrim
Znuny newbie
Posts: 13
Joined: 26 Sep 2007, 09:45

Anmeldung an einem Active Directory

Post by chrim »

Dann funktioniert es jetzt, oder?
Dennis
Znuny wizard
Posts: 310
Joined: 16 Dec 2005, 14:40
Location: Schömberg
Contact:

Anmeldung an einem Active Directory

Post by Dennis »

ähhhhhmmm

$Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=Administrator,CN=USERS,DC=example,DC=test,DC=local';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'PW VON Administrator';

Das ist keine gute Idee...erstell dir einen Benutzer ohne größere Berechtigungen und nimm den
Produktiv:
SuSE 11.2 - OTRS 2.4.7
chrim
Znuny newbie
Posts: 13
Joined: 26 Sep 2007, 09:45

Anmeldung an einem Active Directory

Post by chrim »

Das war sicher nur exemplarisch !? Aber man weiß ja nie. :-)
Ich hatte oberhalb ja bereits darauf hingewiesen und einen Service-User für solche Zwecke empfohlen. :-)

Man kann es aber ja nie oft genug sagen.....
Woddi
Znuny newbie
Posts: 23
Joined: 02 Aug 2007, 15:24
Znuny Version: 2.4.5

Anmeldung an einem Active Directory

Post by Woddi »

Hi,

ja das war auch nur nen Administrator der alles kann um erstmal ein paar möglichkeiten auszuschliessen das es nicht klappt. Ist auch nur ein Testsystem. In der Produktion gibt es technische Accounts und die haben nur die Berechtigungen zu lesen.
Aber danke für den Hinweis!

Eine Frage habe ich noch. Und zwar wenn ich mich nun mit ldap anmelde und die Domäne ist gerade nicht verfügbar, kann er dann die lokale Datenbank abfragen und dort den user nehmen? Es sollte halt so funktionieren das der User sich schon mindestens 1 mal am OTRS angemeldet haben muss zwecks passwort und das automatische anlegen des Users. Es wäre halt praktisch das man weiterarbeiten auch wenn du Domäne gerade mal nicht verfügbar ist.
Was würde das für Sicherheitsrisiken hervorrufen? Wird das System unsicherer?
Debian etch / Apache 2.2 / Postfix / OTRS 2.4.5 / ITSM 1.3.2
Dennis
Znuny wizard
Posts: 310
Joined: 16 Dec 2005, 14:40
Location: Schömberg
Contact:

Anmeldung an einem Active Directory

Post by Dennis »

Das Passwort wird immer in die MySQL DB übernommen. Ich gehe davon aus, dass die Anmeldung auch funktioniert wenn der DC mal nicht da ist, beschwören würde ich es aber jetzt nicht.
Produktiv:
SuSE 11.2 - OTRS 2.4.7
Woddi
Znuny newbie
Posts: 23
Joined: 02 Aug 2007, 15:24
Znuny Version: 2.4.5

Anmeldung an einem Active Directory

Post by Woddi »

Hallo,

also ich habe den Windows 2003 Server runtergefahren und dann komm folgende Fehlermeldung.

Code: Select all

 OTRS-CGI-01[2726]: [Error][Kernel::System::Auth::LDAP::Auth][Line:163]: Can't connect to 192.168.12.1: IO::Socket::INET: connect: Connection refused
Und die Anmeldung ist dann fehl geschlagen.
Hat da jemand ne Ahnung wie man sich dann trotz der nichthochgefahrenen Domaine noch anmelden kann?
Debian etch / Apache 2.2 / Postfix / OTRS 2.4.5 / ITSM 1.3.2
Dennis
Znuny wizard
Posts: 310
Joined: 16 Dec 2005, 14:40
Location: Schömberg
Contact:

Anmeldung an einem Active Directory

Post by Dennis »

Ich habe mal einen Bugreport zu dem Thema eröffnet:

http://bugs.otrs.org/show_bug.cgi?id=2483
Produktiv:
SuSE 11.2 - OTRS 2.4.7
Woddi
Znuny newbie
Posts: 23
Joined: 02 Aug 2007, 15:24
Znuny Version: 2.4.5

Anmeldung an einem Active Directory

Post by Woddi »

Ja wäre schön, wenn es sowas geben könnte. Mal gucken ob es bei irgendeiner der nächsten Versionen dabei ist.
wonz
Znuny newbie
Posts: 60
Joined: 05 Aug 2009, 14:16
Znuny Version: 2.4.5

Anmeldung an einem Active Directory

Post by wonz »

Woddi wrote:So mal meine entgültige Konfiguration.

#LDAP Konfiguration
# ADS Connect
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'IPAddresse';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=example,dc=test,dc=local';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=otrs,CN=USERS,DC=example,DC=test,DC=local';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=Administrator,CN=USERS,DC=example,DC=test,DC=local';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'PW VON Administrator';

#### UserSyncLDAPMap
# (map if agent should create/synced from LDAP to DB after login)
$Self->{UserSyncLDAPMap} = {
# # DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
Phone => 'telephoneNumber',
Username => 'sAMAccountName',
comment => 'description',
};

#LDAP Konfiguration Ende

Soweit passt alles. es werden nun nur die Users zugelassen die im AD auch in der gruppe otrs sind.
Hallo :)

Ich benutze das AD als Authentifizierung und Datenbank für die Kunden.
Allerdings tauchen bei mir in der "Kunden-Benutzer"-Verwaltung auch Windows Gruppen auf.
Ich würde gerne nur einer Windows Gruppe die Anmeldung erlauben (und auch nur diese als Kunden eingetragen haben).
Eigentlich dachte ich dass

Code: Select all

$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=otrs,CN=USERS,DC=example,DC=test,DC=local';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member'; 
dazu führen würde.. das bringts bei mir aber nicht... :(

Nutze übrigens OTRS2.4.

Code: Select all


#################
#Enable LDAP authentication for Customers / Users
  $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
  $Self->{'Customer::AuthModule::LDAP::Host'} = 'dc01.mh.xxx.com';
  $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=mh,dc=xxx,dc=com';
  $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
  $Self->{'AuthModule::LDAP::GroupDN'} = 'CN=Dom-OTRS-Customer,OU=Groups,DC=mh,DC=xxx,DC=com';
  $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';

#The following is valid but would only be necessary if the
#anonymous user do NOT have permission to read from the LDAP tree
  $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'otrs_ldap';
  $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'geheim;)';
#CustomerUser
#(customer user database backend and settings)

#CustomerUser
#(customer user database backend and settings)
   $Self->{CustomerUser} = {
     Module => 'Kernel::System::CustomerUser::LDAP',
     Params => {
      Host => 'dc01.mh.xxx.com',
      BaseDN => 'dc=mh,dc=xxx,dc=com',
      SSCOPE => 'sub',
      UserDN =>'otrs_ldap',
      UserPw => 'geheim;)',
    },
    # customer unique id
    CustomerKey => 'sAMAccountName',
    # customer #
    CustomerID => 'mail',
    CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserSearchPrefix => '',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 250,
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    Map => [
      # note: Login, Email and CustomerID needed!
      # var, frontend, storage, shown, required, storage-type
      #[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
      [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
      [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
      [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
      [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
      [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
      [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
      #[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
      #[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
    ],
  };

Hoffe auf Eure Hilfe. Vielen Dank im voraus :)
OS: Ubuntu 9.04; OTRS v.2.4.7; DB: MYSQL
wonz
Znuny newbie
Posts: 60
Joined: 05 Aug 2009, 14:16
Znuny Version: 2.4.5

Anmeldung an einem Active Directory

Post by wonz »

Hab den Fehler gefunden:

vor "AuthModule"

Code: Select all

  $Self->{'AuthModule::LDAP::GroupDN'} = 'CN=Dom-OTRS-Customer,OU=Groups,DC=mh,DC=xxx,DC=com';
  $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
gehört noch ein "Customer::"

Code: Select all

  $Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'CN=Dom-OTRS-Customer,OU=Groups,DC=mh,DC=xxx,DC=com';
  $Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'member';
und schon klappts auch mit dem Nachbarn....
OS: Ubuntu 9.04; OTRS v.2.4.7; DB: MYSQL
crazychris
Znuny newbie
Posts: 4
Joined: 08 Oct 2009, 15:54
Znuny Version: ohne

Anmeldung an einem Active Directory

Post by crazychris »

Hallo,
ich bin neu hier im Forum und vielleicht auch nicht ganz richtig, möchte aber denoch versuchen ob Ihr mir helfen könnt.

Ja ich weiß ist etwas verwirrend bei uns hier, aber vielleicht hilft es ja wenn ich die Situation nochmal kurz schildere.
AD läuft ansich gut und wird auch von allen PC-Usern genutzt. Jetzt ist es aber so das wir eine recht gemischte Systemumgebung haben, manche PC-User müssen sich noch auf einem UNIX-Server mit Sambafreigaben verbinden.
Jetzt wäre es natürlich ideal wenn sie sich nicht neu anmelden müssten sondern sich mit ihrem Windows-Account verbinden könnten.
Die Software die unter UNIX läuft unterstützt aber keinen AD Zugriff sondern nur LDAP. Drum unsere Überlegung einen Linuxserver mit LDAP aufzusetzen und hierüber das AD abzuchecken und den User für den "Sambazugriff" freizugeben.
Aber dazu müsste ich ja das AD und deren Gruppen abfragen können.

Also es soll möglichst nur der WIN-AD-Account genutzt werden um sich mit der Samba-Freigabe zu verbinden.

Muß ich da in der ldap.conf noch Änderungen vornehmen?

Code: Select all

# RFC 2307 (AD) mappings
#nss_map_objectclass posixAccount user
#nss_map_objectclass shadowAccount user
#nss_map_attribute uid sAMAccountName
#nss_map_attribute homeDirectory unixHomeDirectory
#nss_map_attribute shadowLastChange pwdLastSet
#nss_map_objectclass posixGroup group
#nss_map_attribute uniqueMember member
#pam_login_attribute sAMAccountName
#pam_filter objectclass=User
#pam_password ad

# configure --enable-authpassword is no longer supported
# AuthPassword mappings
#nss_map_attribute userPassword authPassword

# AIX SecureWay mappings
#nss_map_objectclass posixAccount aixAccount
#nss_base_passwd ou=aixaccount,?one
#nss_map_attribute uid userName
#nss_map_attribute gidNumber gid
#nss_map_attribute uidNumber uid
#nss_map_attribute userPassword passwordChar
#nss_map_objectclass posixGroup aixAccessGroup
#nss_base_group ou=aixgroup,?one
#nss_map_attribute cn groupName
#nss_map_attribute uniqueMember member
#pam_login_attribute userName
#pam_filter objectclass=aixAccount
#pam_password clear

# For pre-RFC2307bis automount schema
#nss_map_objectclass automountMap nisMap
#nss_map_attribute automountMapName nisMapName
#nss_map_objectclass automount nisObject
#nss_map_attribute automountKey cn
#nss_map_attribute automountInformation nisMapEntry
So, Verwirrung komplett.

Ich hoffe ihr könnt mir helfen.

crazychris
garwen
Znuny expert
Posts: 260
Joined: 03 Feb 2009, 16:51
Znuny Version: 2.4.7

Anmeldung an einem Active Directory

Post by garwen »

Wieso der Umweg über einen Linuxserver ?
Kannst doch vom Unix wie auch vom OTRS direkt über LDAP ins AD.

Wie Du OTRS für LDAP konfigurierst, findest Du hier: http://doc.otrs.org/2.4/de/html/x1907.h ... ckend-ldap
MfG
~Fredy

Produktiv: OTRS 3.0.11/ openSUSE 11.4 / Apache2, MySQL5 / Exchange 2010
crazychris
Znuny newbie
Posts: 4
Joined: 08 Oct 2009, 15:54
Znuny Version: ohne

Anmeldung an einem Active Directory

Post by crazychris »

Ja stimmt schon, aber unsere "Problem-Anwendung" läuft auf einem UNIX-Server unter Solaris 9 und unterstützt AD nicht direkt. Auf dem UNIX-Server wollen wir kein LDAP installieren und der AD-Server ist ein WindowsServer 2003 auf dem auch kein LDAP installiert werden darf (Firmenwunsch).
Also kamen wir auf diesen Weg, über einen Linux-Server zu gehen.
Soll sozusagen Vermittler zwischen UNIX und Win sein. :?

Chris
garwen
Znuny expert
Posts: 260
Joined: 03 Feb 2009, 16:51
Znuny Version: 2.4.7

Anmeldung an einem Active Directory

Post by garwen »

:roll: ... wenn Manager die IT Entscheidungen treffen dürfen, kommt sowas dabei raus.
MfG
~Fredy

Produktiv: OTRS 3.0.11/ openSUSE 11.4 / Apache2, MySQL5 / Exchange 2010
crazychris
Znuny newbie
Posts: 4
Joined: 08 Oct 2009, 15:54
Znuny Version: ohne

Anmeldung an einem Active Directory

Post by crazychris »

eben, und das ist ja mein Problem. Ich soll es jetzt realisieren. :?
Naja. werde eine Lösung finden.

Gruß
Chris
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Anmeldung an einem Active Directory

Post by jojo »

Ein Active Directory ist ein LDAP!
"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
crazychris
Znuny newbie
Posts: 4
Joined: 08 Oct 2009, 15:54
Znuny Version: ohne

Anmeldung an einem Active Directory

Post by crazychris »

danke jojo , habs kappiert !
Post Reply