Automated user login creating

Hello!

I want to write small script to create about 100 logins,
but I have no idea how i could get them intop the database.
Is an entry in the mysql table enough?

bye sven
Sven Sternberger Tel.: +49 (0) 40 8998 4397
Desy Email: sven.sternberger@desy.de
Notkestr. 85
D-22607 Hamburg

Sven Sternberger sven.sternberger@desy.de writes:

Hello!

I want to write small script to create about 100 logins,
but I have no idea how i could get them intop the database.
Is an entry in the mysql table enough?

Use the API provided for
this. http://www.stacken.kth.se/~ian/ldap-add-users.pl is a script I
wrote that pulls users from LDAP and puts them in RT’s user db.
/Ian D
ian@assv.net - www.assv.net

Ian D ian@assv.net writes:

Sven Sternberger sven.sternberger@desy.de writes:

Hello!

I want to write small script to create about 100 logins,
but I have no idea how i could get them intop the database.
Is an entry in the mysql table enough?

Use the API provided for
this. http://www.stacken.kth.se/~ian/ldap-add-users.pl is a script I
wrote that pulls users from LDAP and puts them in RT’s user db.

http://www.stacken.kth.se/~ian/ldap-add-users.text is a URL that works better.

For those with afs, it’s
/afs/stacken.kth.se/home/ian/public_html/ldap-add-users.text
/Ian D
ian@assv.net - www.assv.net

Ian D wrote:
[snip]

http://www.stacken.kth.se/~ian/ldap-add-users.text is a URL that works better.
[snip]

Hello Ian,
this script seems to be the last missing brick in building the foundation for
a complete integration of RT into an existing LDAP structure (along with the
formaidable LDAP External User Lookup, the LDAPsync script from SCA and the
Qsearch add on). Unfortunately, I cannot get it to work from scratch, and it
does not come with any dosumentation other than the source.

I changed most of the filter stuff for the LDAP access except for the lines

foreach $entry ($mesg->all_entries){
$ref = $entry->get_value( ‘employeeNumber’ );
if($ref){
push @users, $entry->get_value(‘uid’);
}
}

Am I right in assuming that empoyeeNumber is part of Your ldap schema? Is this
Your primary key? If yes, is it safe to change it to our primary key? Does the
script expect any arguments?

Sorry for all these questions,
Harald

Harald WagenerAn der Alster 4220099 Hamburg*http://www.fcb-wilkens.com

“Harald Wagener” hwagener@hamburg.fcb.com writes:

foreach $entry ($mesg->all_entries){
$ref = $entry->get_value( ‘employeeNumber’ );
if($ref){
push @users, $entry->get_value(‘uid’);
}
}

Am I right in assuming that empoyeeNumber is part of Your ldap schema?
Is this Your primary key? If yes, is it safe to change it to our
primary key? Does the script expect any arguments?

Yes, employeeNumber is an attribute we have for separating people
actually working here with ones in the LDAP database for other
purposes (webhosting, CVS access et c). It should be portable
enough. The script doesn’t expect any arguments (it just loops through
all posixAccount’s, looks at the employeeNumber attribute, sees that
one’s there and pushes to the users-stack)

It’s fugly code that I slapped together by looking at the `rt’ script
provided and reading some Net::LDAP code, but it works. I forgot to
license it, so I have no idea if it’s BSD or GPL. Just give me some
credit in it and I’ll be happy.

/Ian D
ian@assv.net - www.assv.net