Need help with custom coding. New to Perl here...

English! place to talk about development, programming and coding
Post Reply
sry9681
Znuny newbie
Posts: 4
Joined: 23 Jul 2015, 18:03
Znuny Version: The most recent one.

Need help with custom coding. New to Perl here...

Post by sry9681 »

I am running the latest version on an Ubuntu Server and have successfully set up Active Directory login but have a couple of questions. So the 'mail' command is pulling the email from active directory but emails were never set up in there. But (nearly) everyone's emails is set up like this: [firstname]@[buildingName].com
[firsname] being the 'givenName' command (with the exception of a few individuals because they have the same first name) and [buildingName] being defined as CN=[job position],OU=[shortened version of buildingName],DC=ihp,DC=local in the Active Directory which means I need to define [buildingName] from the short version of buildingName through each users dn= in the Active Directory.
I am sorry if this is hard to understand.

Code: Select all

    # AuthSyncModule::LDAP::UserSyncMap
    # (map if agent should create/synced from LDAP to DB after successful login)
   $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
       # DB -> LDAP
       UserFirstname => 'givenName',
       UserLastname  => 'sn',
       UserEmail     => 'mail',
   };
   
I understand this code is missing a lot and that is because there is too much irrelevant code to be worth posting since this is the only important part.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Need help with custom coding. New to Perl here...

Post by crythias »

This isn't a developer question. You're configuring, not coding.
sry9681 wrote:emails were never set up in there
That's unfortunate. So you're saying there is not an attribute in AD that holds the email address as configured? It would be helpful to make that assignation in your data source.

Based upon http://community.spiceworks.com/topic/1 ... -directory,
This might help, though your data is your responsibility. Links to other sites do not imply endorsement by this site or the author of this post, nor suitability for a given purpose, but have been provided as a convenience based upon conversation.
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
sry9681
Znuny newbie
Posts: 4
Joined: 23 Jul 2015, 18:03
Znuny Version: The most recent one.

Re: Need help with custom coding. New to Perl here...

Post by sry9681 »

I successfully fixed the problem in a different way. I used a program called ADModify which could edit AD users in bulk using variables such as %givenName%@companyemail.com
Post Reply