LDAP UserEmail invalid!!

Moderator: crythias

Locked
gutmensch
Znuny newbie
Posts: 2
Joined: 02 Dec 2011, 19:20
Znuny Version: 2.4
Real Name: R S
Company: CMS

LDAP UserEmail invalid!!

Post by gutmensch »

Hey guys,

LDAP pita again ftw. ;-) Sorry to bother anyone, didn't find something about my special problem, so here it goes:

1. LDAP auth works flawlessly
2. LDAP sync also (I think)
3. OTRS refuses to sync LDAP user to local RDBMS because mail address is invalid. Basically that is correct, because I only have partial mail addresses in my LDAP like

mail: firstname.lastname

...where I know that the global domain can be added to it like @example.com and it will be valid.

So first of all, the log:

Code: Select all

Dec  2 18:18:08 lsm-trouble OTRS-CGI-10[27651]: [Notice][Kernel::System::Auth::LDAP::Auth] User: pcsaal01 (-snip-) authentication ok (REMOTE_ADDR: 141.20.6.194).
Dec  2 18:18:08 lsm-trouble OTRS-CGI-10[27651]: [Notice][Kernel::System::User::GetUserData] Panic! No UserData for user: 'pcsaal01'!!!
Dec  2 18:18:08 lsm-trouble OTRS-CGI-10[27651]: [Error][Kernel::System::User::UserAdd][Line:311]: Email address (support.pc-saal) not valid (invalid support.pc-saal (no mail exchanger (mx) found!)! )!
Dec  2 18:18:08 lsm-trouble OTRS-CGI-10[27651]: [Error][Kernel::System::Auth::Sync::LDAP::Sync][Line:261]: Can't create user 'pcsaal01' (-snip-) in RDBMS!
Dec  2 18:18:08 lsm-trouble OTRS-CGI-10[27651]: [Error][Kernel::System::User::UserLookup][Line:696]: No UserID found for 'pcsaal01'!
Dec  2 18:18:08 lsm-trouble OTRS-CGI-10[27651]: [Error][Kernel::System::User::UserLookup][Line:696]: No UserID found for 'pcsaal01'!
Dec  2 18:18:08 lsm-trouble OTRS-CGI-10[27651]: [Notice][Kernel::System::User::GetUserData] Panic! No UserData for user: 'pcsaal01'!!!
And now the essential part of the sync config:

Code: Select all

    $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
       # DB -> LDAP
       # UserLogin => 'samaccountname',
        UserFirstname => 'givenName',
        UserLastname  => 'sn',
        UserEmail     => 'mail',
        UserPhone => 'telephonenumber',
    };
As you can see, he doesn't like support.pc-saal as valid mail address but it would be valid if I could just add @example.com to it, is this possible within UserEmail => 'mail' ? Any other options? Can I add mx domains manually? Changing all mail addresses in LDAP is not an option. ;-)

Thanks for your help!
Cheers
Robert
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: LDAP UserEmail invalid!!

Post by crythias »

well, it is perl, so if they're all going to have @example.com, you might stick that as a string concatenation in Config.pm (I'd recommend this on a specific backend, though.)
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
gutmensch
Znuny newbie
Posts: 2
Joined: 02 Dec 2011, 19:20
Znuny Version: 2.4
Real Name: R S
Company: CMS

Re: LDAP UserEmail invalid!!

Post by gutmensch »

Thanks for your reply crythias!

Sorry, if I'm really braindead in this matter, but how could I just add '@example.com' to the entry it gets from LDAP? The mapping of 'mail' seems to correlate to the specific LDAP data, everytime I try to concatenate at least something to it I get

Code: Select all

Dec  2 23:05:23 lsm-trouble OTRS-CGI-10[6304]: [Error][Kernel::System::User::UserAdd][Line:300]: Need UserEmail!
I already tried different versions, even just setting a static mail address, however I don't seem to get the point and it working, my apologies ;-/
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: LDAP UserEmail invalid!!

Post by crythias »

eh... Sorry. I was being simplistic. I regret i don't have a good answer at the moment.
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
Locked