[rt-users] Problems with new users

Thomas Sibley trs at bestpractical.com
Thu Feb 23 12:15:23 EST 2012


On 02/23/2012 12:07 PM, Scott Pestana wrote:
> #/usr/bin/perl
> #RT_User_Update.pl - NSP 20120222
> use RT;
> use RT::Extension::LDAPImport;
> Set($LDAPHost,'ldap://ldapserver.linguamatics.com');        #CPAN leaves
> out the $....
> Set($LDAPUSER,'');                                                   
>                 # again
> Set($LDAPPassword,'');                                               
>             # and again
> connect_ldap();
> 
> #Mirror RT_SiteConfig.pm for the Attribute Mapping:
> Set($LDAPMapping, { 'Name' => 'uid', 'EmailAddress' => 'mail',
> 'RealName' => 'cn',
>             'ExternalAuthId' => 'uid', 'Gecos' => 'gecos' };
> 
> #Pull in the records since last time:
> import_users( 'import' => 1 );
> 
> #Clean up
> disconnect_ldap();
> 
> 1;
> 
>      And then we'll run that perl script on our RT server (owlwoman,
> etc) whenever new employees come on board (and have been entered into
> LDAP).  Does this make sense?

Why aren't you using the rtldapimport script that ships with
RT::Extension::LDAPImport?

/opt/rt4/local/plugins/RT-Extension-LDAPImport/bin/rtldapimport --help

Thomas



More information about the rt-users mailing list