LDAP customer attributes issue

Moderator: crythias

Post Reply
fsidoli
Znuny newbie
Posts: 24
Joined: 24 Nov 2011, 12:01
Znuny Version: 5.0.20
Real Name: Fabrizio Sidoli

LDAP customer attributes issue

Post by fsidoli »

Hi,

I'm running OTRS 5 and have configured LDAP as my external back end by following the example in this link

https://otrs.github.io/doc/manual/admin ... kends.html

I would like to pull in the manager attribute from our AD. This is trivial enough with the addition of the following line to the MAP array

[ 'UserManager', 'Manager', 'manager', 1, 0, 'var' ],

However, when displayed in OTRS the Manager field shows something like CN=Joe Bloggs,OU= etc.... What I would like is for or to just show 'Joe Bloggs'. Is there a way to manipulate the variable UserManager that I have created to show only the CN?

Many thanks,
Fab
fsidoli
Znuny newbie
Posts: 24
Joined: 24 Nov 2011, 12:01
Znuny Version: 5.0.20
Real Name: Fabrizio Sidoli

Re: LDAP customer attributes issue

Post by fsidoli »

Hi All,

I wondered if anyone had any thoughts on the matter, even if it is to say that it cannot be done?

Kind regards,
Fab
fsidoli
Znuny newbie
Posts: 24
Joined: 24 Nov 2011, 12:01
Znuny Version: 5.0.20
Real Name: Fabrizio Sidoli

Re: LDAP customer attributes issue

Post by fsidoli »

It seems like the following would help Net::LDAP::Util ldap_explode_dn, although I'm not a perl expert so I'm not quite sure I would know how to use it.
RonaldoRoss
Znuny newbie
Posts: 1
Joined: 04 Feb 2016, 08:27
Znuny Version: otrs 3.3
Real Name: ronaldo ross
Company: pharmacyglobalrx.com/generic-viagra
Location: Alaska
Contact:

Re: LDAP customer attributes issue

Post by RonaldoRoss »

This is such a normal information. customer will attract with orts and ldap.
fsidoli
Znuny newbie
Posts: 24
Joined: 24 Nov 2011, 12:01
Znuny Version: 5.0.20
Real Name: Fabrizio Sidoli

Re: LDAP customer attributes issue

Post by fsidoli »

Hi,

Can someone please let me know if this is even possible?

Thanks,
Fab
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

Re: LDAP customer attributes issue

Post by EXG133 »

'Manager' in AD is always the distinguished name of another user.
You could create a new custom field in AD and populate this with the names of the manager based on the Manager attribute. That sounds a lot more simple than trying to get the name in OTRS code.
fsidoli
Znuny newbie
Posts: 24
Joined: 24 Nov 2011, 12:01
Znuny Version: 5.0.20
Real Name: Fabrizio Sidoli

Re: LDAP customer attributes issue

Post by fsidoli »

Hi,

Thanks for your reply. The thought did cross our minds but we dismissed it on the basis of it being a duplication of data in the AD. If it can't be done any other way then I guess we'll have to just accept that.

Cheers,
Fab
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

Re: LDAP customer attributes issue

Post by EXG133 »

Well the problem is that the /opt/otrs/Kernel/System/Auth/Sync/LDAP.pm trusts the LDAP source and fetches the exact content of the field, nothing more. I'm sure any OTRS developer could catch that value and look up the name of the dn, but I'm not familiar enough with Net::LDAP. If you've got a support contract you could ask xxx, otherwise otrs365, znuny, capeIT,proclarify or perl-services (no particular order, haven't worked with any of them) are often mentioned.
Post Reply