You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2008-04-24 13:32:11

sarikan
Member
Registered: 2008-04-16
Posts: 7

Importing users from a database

Hi,
We have a large set of users (more than 300.000) in an information system, and we'd like to be able to handle their problems through glpi.
We do not want to force these users to re-register to glpi again, so we'd like to be able to import them as post-only users to glpi database, so what their mails are automatically handled, i.e their names selected as requester.
I did not see any features that'd allow me to that, and looking at the db, it appear glpi is not holding the password, but instead holding a md5 hash of it. Are there any tools that'd allow me to do this mass import, or am I on my own ?

All the best
Seref

Offline

#2 2008-04-24 19:21:19

augusto.ferronato
Member
From: Brasilia - DF / Brasil
Registered: 2008-03-19
Posts: 190

Re: Importing users from a database

Plugin Data_Injection ?? How this users auth in your system? LDAP? MySQL?

big_smile


SO: Gentoo
Version: PROD GLPI 0.84.6 / DEV: SVN
PHP: PHP 5.3.4-pl0-gentoo / MySQL: 5.1.51-log
OCS: OCS-NG 2.0

Offline

#3 2008-04-24 20:35:11

sarikan
Member
Registered: 2008-04-16
Posts: 7

Re: Importing users from a database

I'm using mysql for authentication of glpi users. I've just taken a look at the db structure, and is looks trivial to write a small utility to insert users into users table and user_profiles table.
The only trick is the md5 password generation in users table, but that'd be quite easy. Does data injection plugin cover this requirement? I have a feeling that I might be re-inventing the wheel here. Surely someone else must have done this way before smile

All the best

Offline

#4 2008-04-26 01:07:19

asemerdjian
Member
From: Los Angeles, Ca
Registered: 2008-04-16
Posts: 17

Re: Importing users from a database

Just a thought, why not export the data into .csv format then import into the MySQL GLPI_Users table.

1.backup your database first...!
2.export GLPI_Users table
3.export Users table from your own db
4.use access or excel to fill in default/misc info so it would match GLPI_Users table
5.import new database into GLPI_Users db
-http://www.modwest.com/help/kb.phtml?qid=253&cat=6
-http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html

Try it with 5-10 records, if you like your results go full

remember to backup, in case you need to revert back
good luck.

Offline

#5 2008-04-26 09:52:07

sarikan
Member
Registered: 2008-04-16
Posts: 7

Re: Importing users from a database

Thanks for the feedback,
I've written a small tool and imported over 300.000 (yes three hundred thousand) users and at that point a very serious problem emerged.
Without enabling ajax, glpi can't even load various screens, since it is hard to place 300k users into a combo box!
With ajax enabled, the search functionality simply bogs down the system to the point of being unusable. I've added full text indexes to db table fields , but no serious improvement was observed.
I guess I won't be able to use glpi, but thanks for the support anyway

All the best
Seref

Offline

#6 2008-04-26 10:51:17

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Importing users from a database

The search dropdown functionality use a LIKE "%pattern%" which is really not optimized.

One workaround will be to change to "pattern%" (which can use the index).

GLPI has been greatly optimized to work on large configuration. But using data split between entities.
Yes a problem must exists with users, or  when you have a global view.

I guess I won't be able to use glpi, but thanks for the support anyway

If you have such a big structure that requires 300000 users, you probably could find a way to contribute to GLPI optimization.

++


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

Board footer

Powered by FluxBB