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-02-05 13:02:02

dhiraj
Member
From: INDIA
Registered: 2007-12-06
Posts: 77

Mass Sync LDAP Users

I have imported around 4200 users  from my AD. Things are rather working fine and I am happy with the roll out. But we plan to updated many user properties in the AD for some reason and now I need to mass sync all the previous imported users.
One way out is go to LDAP Users and then hit " Sync already imported users" but it does not seem to work completely. I want to know if there is a possibility of "Force Syncronization" for Users just like the way it is for Inventory -> Computers .

Thanks in Advance

Dhiraj


OS : Fedora Core 7
GLPI : 0.7             OCS-NG : 4100
Web Server : Apache 2.2.3 DB: MySql 5.0.27   
Langage : PHP 5.2.4  Syslog-NG: 2.0.5

Offline

#2 2008-02-05 14:06:22

wawa
GLPI-DEV
From: Montpellier / France
Registered: 2006-07-03
Posts: 6,019
Website

Re: Mass Sync LDAP Users

Hello
You can do it by script, using scripts/ldap_mass_sync.php -- action=1 server_id=<id of your ldap server in GLPI (not the name)> filter=(uid\=*)
adding a massive action for that may be a good idea.

Walid.

Offline

#3 2008-02-09 08:32:01

dhiraj
Member
From: INDIA
Registered: 2007-12-06
Posts: 77

Re: Mass Sync LDAP Users

Thanks Walid

I ll try it tonite and let u know.


OS : Fedora Core 7
GLPI : 0.7             OCS-NG : 4100
Web Server : Apache 2.2.3 DB: MySql 5.0.27   
Langage : PHP 5.2.4  Syslog-NG: 2.0.5

Offline

#4 2008-02-09 08:49:08

dhiraj
Member
From: INDIA
Registered: 2007-12-06
Posts: 77

Re: Mass Sync LDAP Users

I get an error when i run this command on the shell

php ldap_mass_sync.php -- action=1 server_id=conn filter=(uid\=*)

ERROR
-bash: syntax error near unexpected token `('

I am also not sure about the id thing. By "id of ldap server in glpi " do we mean that the name of the connection which we have defined in Setup -> Authentication OR any numeric ID defined in the database. I am currently using the name


OS : Fedora Core 7
GLPI : 0.7             OCS-NG : 4100
Web Server : Apache 2.2.3 DB: MySql 5.0.27   
Langage : PHP 5.2.4  Syslog-NG: 2.0.5

Offline

#5 2008-02-09 10:36:56

wawa
GLPI-DEV
From: Montpellier / France
Registered: 2006-07-03
Posts: 6,019
Website

Re: Mass Sync LDAP Users

it's the numerical ID

Offline

#6 2008-02-09 11:02:25

dhiraj
Member
From: INDIA
Registered: 2007-12-06
Posts: 77

Re: Mass Sync LDAP Users

I have got the numeric ID but when I gave the filter it gave me the same error, I removed the filter completly and ran the script like this

php ldap_mass_sync.php -- action=1 server_id=1

It gave me this notice
PHP Notice:  Undefined offset:  1 in /scripts/ldap_mass_sync.php on line 49
and then gave these dots
....................................................


Does this mean the script has worked properly ?

Last edited by dhiraj (2008-02-09 11:10:00)


OS : Fedora Core 7
GLPI : 0.7             OCS-NG : 4100
Web Server : Apache 2.2.3 DB: MySql 5.0.27   
Langage : PHP 5.2.4  Syslog-NG: 2.0.5

Offline

#7 2008-02-09 11:23:55

wawa
GLPI-DEV
From: Montpellier / France
Registered: 2006-07-03
Posts: 6,019
Website

Re: Mass Sync LDAP Users

php -q -f ldap_mass_sync.php -- action=1 server_id=1

Offline

Board footer

Powered by FluxBB