[rt-users] How to enumerate users

Ruslan U. Zakirov Ruslan.Zakirov at acronis.com
Thu Nov 18 06:40:18 EST 2004


Ruediger Riediger wrote:
> Hello,
> 
> we want to enumerate (regularly) all users existing in RT3.0.12 to 
> refresh the information (work phone, address, etc) from an LDAP server.
> Obviously, a "/opt/rt3/bin/rt show user/1-9999" would do, but it would 
> be very resource intensive %-)
> 
> Is there a way to pull all users, one at a time?
As far as I understand your task, then you don't want to pull info from RT.
You require CLI that allow you update users info. And script that 
fetches info from LDAP and execute script that updates user record.

Small example that updates user info:

...
use RT::User;
my $u_obj = RT::User->new( $RT::SystemUser );
$u_obj->Load( 'foo at example.com' );
die "No user" unless( $u_obj->id );

$u_obj->Set( Field => 'RealName', Value => 'Foo Z. Bar' );
...

> The check on new data and update from the LDAP is not an issue here... 
> just getting the user list. We currently look at a RT::CLI solution. 
> Possibly a rt-crontool would do as well (if someone has an idea).
> 
> Best regards,
> 
>     Ruediger Riediger
> 




More information about the rt-users mailing list