Bryan, thanks, you pointed me a direction.

Mike, thank you so much, authentication is working fine.

Just to help other user 'group' must be a full DN and 'group_attr' for MS Active Directory must be set with 'member' as Bryan said.

Attached is my RT_SiteConfig.pm as an working example to other users.
My scenario:
RT 3.8.1
RTFM 2.4.0
RT-Authen-ExternalAuth-0.07_01
mod_perl 2.0.2-2.4

Thanks again.

Elton S. Fenner,
Analista de Rede,
Assembléia Legislativa do RS.
+55 51 3210-1202


Mike Peachey wrote:
Bryan McLellan wrote:
  
On Mon, Dec 8, 2008 at 10:44 AM, Elton S. Fenner
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    I can login but get this message in browser:
    *Can't call method "as_string" on an undefined value at
    /opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm
    line 97,  line 514. *


This looks like it's the section of code checking the group.
 

    *                'group'                     =>  'DSI_Rede_Usu',
                    'group_attr'                =>  '',*
    

Either comment both out or use both. If group is set, group_attr MUST be
set or you end up with broken code trying to build an LDAP filter.

  
Set($rtname , "ALERGS");
Set($Organization , "rt.al.rs.gov.br");
Set($Timezone , 'America/Sao_Paulo');

Set($DatabaseType , 'mysql');
Set($DatabaseHost   , 'localhost');
Set($DatabaseRTHost , 'localhost');
Set($DatabasePort , '3306');
Set($DatabaseUser , 'rtuser');
Set($DatabasePassword , '************');
Set($DatabaseName , 'rt3');

Set($WebDefaultStylesheet, 'web2');
Set($WebPath, "");
Set($WebDomain, 'rt.alergs.br' );
Set($WebPort, 80);                                      # + ($< * 7274) % 32766 
+ ($< && 1024));
Set($WebBaseURL, 'http://' . RT->Config->Get('WebDomain') . ':' . 
RT->Config->Get('WebPort'));
Set($WebURL, RT->Config->Get('WebBaseURL') . RT->Config->Get('WebPath') . "/");

Set($RTAddressRegexp , '[EMAIL PROTECTED]');
Set($CorrespondAddress , '[EMAIL PROTECTED]');
Set($CommentAddress , '[EMAIL PROTECTED]');

#Set(@EmailInputEncodings, qw(utf-8 iso-8859-1 us-ascii));
#Set($EmailOutputEncoding, 'utf-8');

#Set($UseFriendlyFromLine, 1);
#Set($FriendlyFromLineFormat, "\"%s via RT\" <%s>");

Set($AutoLogoff, 30);                                   # minutos

#Set($DateTimeFormat, 'DefaultFormat');
Set($DateDayBeforeMonth , 1);

Set($EnableReminders,1);


Set($LogToSyslog , '');
Set($LogDir, '/opt/rt3/var/log');
Set($LogToFileNamed , "rt.log");
# Set($LogToFile      , 'warning');
Set($LogToFile      , 'debug');

# problema de lentidao com ticket merge
# adding
# @LogToSyslogConf = ( socket => 'native' ) unless (@LogToSyslogConf);
# to RT_SiteConfig.pm sped up the merged ticket display from 260 seconds
# to about 6 seconds for us. 





Set( @Plugins, (qw(RT::Authen::ExternalAuth RT::FM)));
# /opt/rt3/local/plugins/RT-Authen-ExternalAuth/etc/RT_SiteConfig.pm



Set($ExternalAuthPriority,  ['My_LDAP']);
Set($ExternalInfoPriority,  ['My_LDAP']);
Set($ExternalServiceUsesSSLorTLS,    0);
Set($AutoCreateNonExternalUsers,    0);
Set($ExternalSettings,      {
        'My_LDAP'       =>  {
                'type'                      =>  'ldap',
                'auth'                      =>  1,
                'info'                      =>  1,
                'server'                    =>  'ds1.alergs.br',
#                'user'                      =>  'cn=adrt,ou=Contas de 
Servicos,ou=DSI - Sistemas e Informatica,ou=Corporativo,dc=alergs,dc=br',
                'user'                      =>  
'cn=adrt,ou=Corporativo,dc=alergs,dc=br',
                'pass'                      =>  '************',
                'base'                      =>  'dc=alergs,dc=br',
                'filter'                    => '(objectClass=*)',
                'd_filter'                  => 
'(userAccountControl:1.2.840.113556.1.4.803:=2)',
#                'd_filter'                  =>  
'((&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2)(!name=_*)))',
                'tls'                       =>  0,
                'net_ldap_args'             => [    version =>  3   ],
                'group'                     =>  'CN=Usuarios do DSI,OU=DSI - 
Sistemas e Informatica,OU=Corporativo,DC=alergs,DC=br',
                'group_attr'                =>  'member',
                'attr_match_list'           => [  'Name',
                                                  'EmailAddress'
                                               ],

###### ATENCAO para a virgula no final da linha ########

                'attr_map'                  =>  {   'Name' => 'sAMAccountName',
                                                    'EmailAddress' => 'mail',
                                                    'RealName' => 'cn'
                                                 }
                               }
               }
);

1;
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to