[rt-users] user batch add script failing

Kevin Falcone falcone at bestpractical.com
Thu Jun 28 12:40:32 EDT 2012


On Wed, Jun 27, 2012 at 11:09:27PM -0400, Andy Harrison wrote:

The fact that you see errors like this:

> [Wed Jun 27 22:43:04 2012] [info]:
> RT::Authen::ExternalAuth::CanonicalizeUserInfo returning Address1: 21
> JARVIS AVE, City: ROCHESTER, Comments: Autocreate from metrocast
> customer mysql db, Disabled: , EmailAddress: devnull.16 at metrocast.net,
> Gecos: 327830, HomePhone: 6039999999, Name: 8282828282100011,
> Password: placeholderpassword.16, Privileged: , RealName: METROCAST
> TEST ACCT HBO ONLY NoHSI, State: NH, WorkPhone: 0000000000, Zip: 03868
> (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:651)
> Trace begun at /opt/rt6/lib/RT.pm line 250

Means that your code below to clobber Plugins isn't working, in large
part because the Plugins have already been loaded during LoadConfig
and Init.

> use RT::Config;
> 
> RT::LoadConfig();
> 
> RT::Init();
> 
> # Make sure external auth is disabled and autocreate is enabled.
> #
> RT->Config->Set( ExternalInfoPriority       => [ ] );
> RT->Config->Set( Plugins                    => ['RT::OnlineDocs'] );
> RT->Config->Set( AutoCreate                 => { Privileged => 0 } );
> RT->Config->Set( AutoCreateNonExternalUsers => 1 );

You may find it easier to cheat and run your script with
RT_SITE_CONFIG=/my/smaller/rt_site_config.pm myscrips.pl
and rt_site_config.pm doesn't declare any of your ExternalAuth
plugins.

Also, pelase note that AutoCreate only comes into play for users
created in the WebUI, so is irrelevant here.  Also,
AutoCreateNonExternalUsers is an RT-Authen-ExternalAuth config option
and is irrelevant if you're disabling RT-Authen-ExternalAuth.

If you don't want a second site config, you'll need to ensure that
your config changes happen before RT loads and parses plugins.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120628/b8a11fcc/attachment.sig>


More information about the rt-users mailing list