We've run it from the command-line and also have a daily cron job run it. I'm sure there are other ways, just depends largely on how sync'd you want the user data in OTRS to be with LDAP.

Terrill

Greg Pennell - HSA Global wrote:

I'm happy changing the file, but do I just run the script from the command line, as a job within OTRS or by browsing directly to the sync-ldap2db.pl file?

Greg

*From:* otrs-boun...@otrs.org [mailto:otrs-boun...@otrs.org] *On Behalf Of *Terrill Yuhas
*Sent:* Friday, 6 March 2009 11:10 a.m.
*To:* User questions and discussions about OTRS.
*Subject:* Re: [otrs] Issues with otrs 2.3.4 and Customer LDAP Auth

Starting around the "my $UidLDAP" line, you want to make sure the db values are properly mapped to your LDAP data. Also make sure the LDAP connection values (around "my $LDAPHost") are correct to connect to your LDAP directory. Then cross your fingers and run it.

Terrill

Greg Pennell - HSA Global wrote:

This may sound like a bit of a dump, newbie question... I've found the
script, but how do I go about running it?
Greg -----Original Message-----
From: otrs-boun...@otrs.org <mailto:otrs-boun...@otrs.org> 
[mailto:otrs-boun...@otrs.org] On Behalf Of
Terrill Yuhas
Sent: Thursday, 5 March 2009 10:29 a.m.
To: User questions and discussions about OTRS.
Subject: Re: [otrs] Issues with otrs 2.3.4 and Customer LDAP Auth
As you'd found out with your testing, OTRS only uses LDAP for authentication and doesn't automatically create a user account in the OTRS db. We use the script that's included in the package and (for us at least) is in /opt/otrs/scripts/tools called sync-ldap2db.pl. There are some LDAP connection variables in there you need to set but it should be ready-to-go aside from that. To keep things in sync, you'll have to periodically run the script. Terrill Jeremy Adams wrote:
    Hi and greetings for the The Great State of Texas,

    Much like many of the users here, I too am new to otrs.  I have

successfully setup otrs 2.3.4 on openSuSE 10.3.  I have successfully
setup Agents via DB back end and have not issues with Agents.  My issues
come when I setup Customer Authentication using LDAP.  All changes have
been made in SysConfig.  No edits have been done to Config.pl - at least
edits that worked.  Again Config.pm is standard.
    Currently users who exist in LDAP receive the following when

attempting authentication through customer.pl:
Panic! No UserData!!!
    But the System Log states that "CustomerUser:[username}

(CN=[username]...) authentication ok...
    I have tried using scrips from the list and from Defaults.pm but still

receive the same error.
    With all that said, I have created a Customer user in the DB with ONLY

First Name, Last Name, and Email address.  This user authenticates and
loads the ticket page.  So I guess there is some issue migrating user
data into the DB.  How is this done?  Below i have attached the WHOLE of
the Config.pm file.  but keep in mind that this issue persists with or
with out the additions to Config.pm
    Below is the output of the otrs.checkModules script and the contents

of Config.pm
    cvcticketsys:/ # ./opt/otrs/bin/otrs.checkModules

       o CGI............................ok (v3.15)

       o Date::Pcalc....................ok (v1.2)

       o Date::Format...................ok (v2.22)

       o DBI............................ok (v1.58)

       o DBD::mysql.....................ok (v4.005)

       o Digest::MD5....................ok (v2.36)

       o Crypt::PasswdMD5...............ok (v1.3)

       o LWP::UserAgent.................ok (v2.036)

       o IO::Scalar.....................ok (v2.110)

       o IO::Wrap.......................ok (v2.110)

       o MIME::Base64...................ok (v3.07)

       o Mail::Internet.................ok (v2.04)

       o MIME::Tools....................ok (v5.427)

       o Net::DNS.......................ok (v0.65)

       o Net::POP3......................ok (v2.28)

          o Net::POP3::SSLWrapper.......ok (v0.02)

       o Net::IMAP::Simple..............ok (v1.17)

          o Net::IMAP::Simple::SSL......ok (v1.3)

       o Net::SMTP......................ok (v2.29)

          o Authen::SASL................ok (v2.11)

       o Net::LDAP......................ok (v0.39)

       o GD.............................ok (v2.35)

          o GD::Text....................ok (v0.85)

          o GD::Graph...................ok (v1.44)

          o GD::Graph::lines............ok (v1.15)

          o GD::Text::Align.............ok (v1)

       o PDF::API2......................not installed! (not required / for

PDF required!)
          o Compress::Zlib..............ok (v2.005)

       o XML::Parser....................ok (v2.34)

    Config.pm contents

        $Self->{'DatabaseHost'} = 'localhost';

        # Database

        # (The database name.)

        $Self->{'Database'} = 'otrs';

        # DatabaseUser

        # (The database user.)

        $Self->{'DatabaseUser'} = 'otrs';

        # DatabasePw

        # (The password of database user. You also can use

bin/CryptPassword.pl
        # for crypted passwords.)

        $Self->{'DatabasePw'} = 'xxxx';

        # DatabaseDSN

        # (The database DSN for MySQL ==> more: "man DBD::mysql")

        $Self->{DatabaseDSN} =

"DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
        # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")

        # if you want to use a local socket connection

    #    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";

        # if you want to use a tcpip connection

    #    $Self->{DatabaseDSN} =

"DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";
        # ---------------------------------------------------- #

        # fs root directory

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

        $Self->{Home} = '/opt/otrs';

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

        # insert your own config settings "here"               #

        # config settings taken from Kernel/Config/Defaults.pm #

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

        # $Self->{SessionUseCookie} = 0;

         $Self->{'CheckMXRecord'} = 1;

    # customer uniq id

            CustomerKey => 'uid',

            # customer #

            CustomerID => 'mail',

            CustomerUserListFields => ['cn', 'mail'],

            CustomerUserSearchFields => ['uid', 'cn', 'mail'],

            CustomerUserSearchPrefix => '',

            CustomerUserSearchSuffix => '*',

            CustomerUserSearchListLimit => 250,

            CustomerUserPostMasterSearchFields => ['mail'],

            CustomerUserNameFields => ['givenname', 'sn'],

            # show now own tickets in customer panel, CompanyTickets

           CustomerUserExcludePrimaryCustomerID => 0,

            # add a ldap filter for valid users (expert setting)

    #       CustomerUserValidFilter => '(!(description=gesperrt))',

    #       # admin can't change customer preferences

           AdminSetPreferences => 0,

    #added as a test from another script

    # $Self->{UserSyncLDAPMap} = {

    #        # DB -> LDAP

    #        UserFirstname => 'givenname',

    #3        UserLastname => 'sn',

     #       UserEmail => 'mail',

     #   };

     #$Self->{DatabaseUserTable}       = 'users';

     #   $Self->{DatabaseUserTableUserID} = 'id';

     #  $Self->{DatabaseUserTableUserPW} = 'pw';

     #   $Self->{DatabaseUserTableUser}   = 'login';

    #    }

#end test add
            Map => [

                # note: Login, Email and CustomerID needed!

                # var, frontend, storage, shown (1=always,2=lite),

required, storage-type, http-link, readonly
    #            [ 'UserSalutation', 'Title',      'title',           1,

0, 'var', '', 0 ],
                [ 'UserFirstname',  'Firstname',  'givenname',       1, 1,

'var', '', 0 ],
                [ 'UserLastname',   'Lastname',   'sn',              1, 1,

'var', '', 0 ],
                [ 'UserLogin',      'Username',   'name',             1,

1, 'var', '', 0 ],
                [ 'UserEmail',      'Email',      'mail',            1, 1,

'var', '', 0 ],
                [ 'UserCustomerID', 'CustomerID', 'mail',            0, 1,

'var', '', 0 ],
                [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids',

1, 0, 'var', '', 0 ],
                [ 'UserPhone',      'Phone',      'telephonenumber', 1, 0,

'var', '', 0 ],
                [ 'UserAddress',    'Address',    'postaladdress',   1, 0,

'var', '', 0 ],
                [ 'UserComment',    'Comment',    'description',     1, 0,

'var', '', 0 ],
            ],

        };

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

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

        # data inserted by installer                           #

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

        # $DIBI$

        $Self->{'SystemID'} = 10;

        $Self->{'SecureMode'} = 1;

        $Self->{'Organization'} = 'Cedar Valley College';

        $Self->{'LogModule::LogFile'} = '/tmp/otrs.log';

        $Self->{'LogModule'} = 'Kernel::System::Log::SysLog';

        $Self->{'FQDN'} = 'cvcticketsys.cvc.educ.dcccd.edu';

        $Self->{'DefaultLanguage'} = 'en';

        $Self->{'AdminEmail'} = 'jeremyad...@dcccd.edu 
<mailto:jeremyad...@dcccd.edu>';

        $Self->{'DefaultCharset'} = 'utf-8';

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

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

        #                                                      #

        #           End of your own config options!!!          #

        #                                                      #

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

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

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

    # needed system stuff (don't edit this)                #

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

    #}

    use strict;

    use warnings;

    use vars qw(@ISA $VERSION);

    use Kernel::Config::Defaults;

    push (@ISA, 'Kernel::Config::Defaults');

    use vars qw(@ISA $VERSION);

    $VERSION = qw($Revision: 1.20 $)[1];

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

    1;

Thanks for any and all assistance,
    Jeremy Adams

    PC Support Specialist I

    Cedar Valley College

    972.860.8086

    ---------------------------------------------------------------------

    OTRS mailing list: otrs - Webpage: http://otrs.org/

    Archive: http://lists.otrs.org/pipermail/otrs

    To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

    NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!

    http://www.otrs.com/en/support/enterprise-subscription/

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/


---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/

Reply via email to