Creation of bulk user.

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan

···

Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com

Hi Hannan,
This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

···

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Dear Mr. Khan

length of the password should not be an issue in creating bulk users in

DHIS2, if and only if it does’t violet any validation checks, like

  1. Password should start with Capital letter.

  2. Password should contains at least one neumaric character.

  3. Password length should not be less than 8 alpha neumaric characters.

  4. Password length should not be greater than … ! etc.

There might be n number of ways one can create user in DHIS2.

But if you are using authentic user creation process, than that

should not make any issue in bull users creation.

We are not that much sure, which approach you are following in

creating more than one users in DHIS2 in your personal script.

Regards

Brajesh Murari

P please consider the environment before printing this email

···

On Wednesday, 7 May 2014 11:40 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical
Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft
für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90,
Gulshan 2, Dhaka 1212, Bangladesh

T
+880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88
01819 239 241

M+88
01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

···

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,
This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

···

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,
This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

···

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,
This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

···

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,
This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

The easiest is to restart DHIS2 (Tomcat)

···

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,
This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Hi,

it is correct that missing UIDs will be generated on system startup.

I think what is being referred to here is dhis UID and not an UUID. There are ways to generate dhis UIDs through the web api but it’s just much simpler to restart tomcat.

regards,

Lars

···

On Wed, May 7, 2014 at 10:19 AM, Knut Staring knutst@gmail.com wrote:

The easiest is to restart DHIS2 (Tomcat)

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,
This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

You can try using this .jar file.

It is not very prepared, but I think it can help you.

I used this to create users from a csv file.

It is not user friendly, so just let me know if you need any help.


user_importer.jar

···

2014-05-07 10:38 GMT+02:00 Lars Helge Øverland larshelge@gmail.com:

Hi,

it is correct that missing UIDs will be generated on system startup.

I think what is being referred to here is dhis UID and not an UUID. There are ways to generate dhis UIDs through the web api but it’s just much simpler to restart tomcat.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Wed, May 7, 2014 at 10:19 AM, Knut Staring knutst@gmail.com wrote:

The easiest is to restart DHIS2 (Tomcat)

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,
This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Hi Lars

Thanks. Yes restarting tomcat can generate the blank UID.

UID is a indexed field so I cannot create more than one user in one go. Is there any solution?

Regards

Hannan

···

On Wed, May 7, 2014 at 2:38 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi,

it is correct that missing UIDs will be generated on system startup.

I think what is being referred to here is dhis UID and not an UUID. There are ways to generate dhis UIDs through the web api but it’s just much simpler to restart tomcat.

regards,

Lars

On Wed, May 7, 2014 at 10:19 AM, Knut Staring knutst@gmail.com wrote:

The easiest is to restart DHIS2 (Tomcat)

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,
This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Hi Hannan,

I think you should try Kenneth’s java application. We created 40,000 users (community health workers with their phone numbers and orgunit link) and assigned them all passwords using the app. I think Kenneth has put in a User interface that lets you specify the server address, DHIS-2 instance or database, etc…

Kenneth could you send Hannan a sample csv file (just 10 records or so) along with your application, so he can test it out. I think it is sufficiently generic.

He sent a link to it in an earlier response. This file is quite big – 54 meg - Kenneth, can it be shrunk a bit more?

If you have java on your Windows computer you should be able to run it as follows:

Java –jar user_importer.jar

Randy

···

Hi Lars

Thanks. Yes restarting tomcat can generate the blank UID.

UID is a indexed field so I cannot create more than one user in one go. Is there any solution?

Regards

Hannan

On Wed, May 7, 2014 at 2:38 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi,

it is correct that missing UIDs will be generated on system startup.

I think what is being referred to here is dhis UID and not an UUID. There are ways to generate dhis UIDs through the web api but it’s just much simpler to restart tomcat.

regards,

Lars

On Wed, May 7, 2014 at 10:19 AM, Knut Staring knutst@gmail.com wrote:

The easiest is to restart DHIS2 (Tomcat)

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,

This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

Thanks Randy

We are trying with Kenneth’s Java application; if we have the sample csv file it will be very help full for us.

Dear Kenneth

Can you please send me a sample CSV file.

Regards

Hannan

···

On Thu, May 8, 2014 at 6:58 PM, Wilson,Randy rwilson@msh.org wrote:

Hi Hannan,

I think you should try Kenneth’s java application. We created 40,000 users (community health workers with their phone numbers and orgunit link) and assigned them all passwords using the app. I think Kenneth has put in a User interface that lets you specify the server address, DHIS-2 instance or database, etc…

Kenneth could you send Hannan a sample csv file (just 10 records or so) along with your application, so he can test it out. I think it is sufficiently generic.

He sent a link to it in an earlier response. This file is quite big – 54 meg - Kenneth, can it be shrunk a bit more?

If you have java on your Windows computer you should be able to run it as follows:

Java –jar user_importer.jar

Randy

From: Dhis2-users [mailto:dhis2-users-bounces+rwilson=msh.org@lists.launchpad.net] On Behalf Of Hannan Khan

Sent: Thursday, May 08, 2014 1:09 PM

To: Lars Helge Øverland

Cc: dhis2-users@lists.launchpad.net; DHIS 2 developers

Subject: Re: [Dhis2-users] Creation of bulk user.

Hi Lars

Thanks. Yes restarting tomcat can generate the blank UID.

UID is a indexed field so I cannot create more than one user in one go. Is there any solution?

Regards

Hannan

On Wed, May 7, 2014 at 2:38 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi,

it is correct that missing UIDs will be generated on system startup.

I think what is being referred to here is dhis UID and not an UUID. There are ways to generate dhis UIDs through the web api but it’s just much simpler to restart tomcat.

regards,

Lars

On Wed, May 7, 2014 at 10:19 AM, Knut Staring knutst@gmail.com wrote:

The easiest is to restart DHIS2 (Tomcat)

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,

This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

Alright. Are you using postgres? If not, this will not work.

Select the by pressing the select button.

In this case, the firstname and surname is in the csv file. Surname in the first column, 0, and firstname in the second column, 1. Select the csv radio button and the right column. Probably already selected.

The username can be made by a combination of the firstname and lastname, then select split+count. If some are equal, numbers will be added.

The random password should just create a random password.

!This is not secure random, just a random string from java!

One needs to enter the right database connection parameters in order to load user roles and orgunits. Or one can use organization unit id or code from the database. The id can be found in the database, codes are usually made manually in DHIS2. We used the codes from the csv file to assign orgunits, column 19.

  1. Enter the correct database parameters.

  2. Exclude incomplete users will not create users that are missing some of the information.

  3. Make csv of imported users, creates a csv file with the usernames and passwords.

  4. Make csv of incomplete records creates a csv file with the users that are missing data.

  5. The files can be found in the same directory as the selected file.

Let me know if there are any trouble.

sample.csv (6.19 KB)

···

2014-05-09 7:00 GMT+02:00 Hannan Khan hannank@gmail.com:

Thanks Randy

We are trying with Kenneth’s Java application; if we have the sample csv file it will be very help full for us.

Dear Kenneth

Can you please send me a sample CSV file.

Regards

Hannan

On Thu, May 8, 2014 at 6:58 PM, Wilson,Randy rwilson@msh.org wrote:

Hi Hannan,

I think you should try Kenneth’s java application. We created 40,000 users (community health workers with their phone numbers and orgunit link) and assigned them all passwords using the app. I think Kenneth has put in a User interface that lets you specify the server address, DHIS-2 instance or database, etc…

Kenneth could you send Hannan a sample csv file (just 10 records or so) along with your application, so he can test it out. I think it is sufficiently generic.

He sent a link to it in an earlier response. This file is quite big – 54 meg - Kenneth, can it be shrunk a bit more?

If you have java on your Windows computer you should be able to run it as follows:

Java –jar user_importer.jar

Randy

From: Dhis2-users [mailto:dhis2-users-bounces+rwilson=msh.org@lists.launchpad.net] On Behalf Of Hannan Khan

Sent: Thursday, May 08, 2014 1:09 PM

To: Lars Helge Øverland

Cc: dhis2-users@lists.launchpad.net; DHIS 2 developers

Subject: Re: [Dhis2-users] Creation of bulk user.

Hi Lars

Thanks. Yes restarting tomcat can generate the blank UID.

UID is a indexed field so I cannot create more than one user in one go. Is there any solution?

Regards

Hannan

On Wed, May 7, 2014 at 2:38 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi,

it is correct that missing UIDs will be generated on system startup.

I think what is being referred to here is dhis UID and not an UUID. There are ways to generate dhis UIDs through the web api but it’s just much simpler to restart tomcat.

regards,

Lars

On Wed, May 7, 2014 at 10:19 AM, Knut Staring knutst@gmail.com wrote:

The easiest is to restart DHIS2 (Tomcat)

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,

This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

For Mysql, i think you could do this in postgres first, then do a metadata export to mysql and finally use sql to bring over the generated passwords.

···

2014-05-09 7:00 GMT+02:00 Hannan Khan hannank@gmail.com:

Thanks Randy

We are trying with Kenneth’s Java application; if we have the sample csv file it will be very help full for us.

Dear Kenneth

Can you please send me a sample CSV file.

Regards

Hannan

On Thu, May 8, 2014 at 6:58 PM, Wilson,Randy rwilson@msh.org wrote:

Hi Hannan,

I think you should try Kenneth’s java application. We created 40,000 users (community health workers with their phone numbers and orgunit link) and assigned them all passwords using the app. I think Kenneth has put in a User interface that lets you specify the server address, DHIS-2 instance or database, etc…

Kenneth could you send Hannan a sample csv file (just 10 records or so) along with your application, so he can test it out. I think it is sufficiently generic.

He sent a link to it in an earlier response. This file is quite big – 54 meg - Kenneth, can it be shrunk a bit more?

If you have java on your Windows computer you should be able to run it as follows:

Java –jar user_importer.jar

Randy

From: Dhis2-users [mailto:dhis2-users-bounces+rwilson=msh.org@lists.launchpad.net] On Behalf Of Hannan Khan

Sent: Thursday, May 08, 2014 1:09 PM

To: Lars Helge Øverland

Cc: dhis2-users@lists.launchpad.net; DHIS 2 developers

Subject: Re: [Dhis2-users] Creation of bulk user.

Hi Lars

Thanks. Yes restarting tomcat can generate the blank UID.

UID is a indexed field so I cannot create more than one user in one go. Is there any solution?

Regards

Hannan

On Wed, May 7, 2014 at 2:38 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi,

it is correct that missing UIDs will be generated on system startup.

I think what is being referred to here is dhis UID and not an UUID. There are ways to generate dhis UIDs through the web api but it’s just much simpler to restart tomcat.

regards,

Lars

On Wed, May 7, 2014 at 10:19 AM, Knut Staring knutst@gmail.com wrote:

The easiest is to restart DHIS2 (Tomcat)

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,

This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

Just wanted to mention that we are now planing to add this functionality to 2.16, it will work as /api/users today (allows creating one user with password etc), but will support bulk import of users + passwords through our meta-data import (/api/metadata), there will be no export of passwords, but we will allow creating of users with password, and also updating, you can send passwords as plaintext, and it will be hashed on the server (please use https for this)

···


Morten

On Fri, May 9, 2014 at 11:44 AM, Knut Staring knutst@gmail.com wrote:

For Mysql, i think you could do this in postgres first, then do a metadata export to mysql and finally use sql to bring over the generated passwords.

On 9 May 2014 10:52, “Kenneth Børtveit” kenneth.bortveit@gmail.com wrote:

Alright. Are you using postgres? If not, this will not work.

Select the by pressing the select button.

In this case, the firstname and surname is in the csv file. Surname in the first column, 0, and firstname in the second column, 1. Select the csv radio button and the right column. Probably already selected.

The username can be made by a combination of the firstname and lastname, then select split+count. If some are equal, numbers will be added.

The random password should just create a random password.

!This is not secure random, just a random string from java!

One needs to enter the right database connection parameters in order to load user roles and orgunits. Or one can use organization unit id or code from the database. The id can be found in the database, codes are usually made manually in DHIS2. We used the codes from the csv file to assign orgunits, column 19.

  1. Enter the correct database parameters.
  1. Exclude incomplete users will not create users that are missing some of the information.
  1. Make csv of imported users, creates a csv file with the usernames and passwords.
  1. Make csv of incomplete records creates a csv file with the users that are missing data.
  1. The files can be found in the same directory as the selected file.

Let me know if there are any trouble.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

2014-05-09 7:00 GMT+02:00 Hannan Khan hannank@gmail.com:

Thanks Randy

We are trying with Kenneth’s Java application; if we have the sample csv file it will be very help full for us.

Dear Kenneth

Can you please send me a sample CSV file.

Regards

Hannan

On Thu, May 8, 2014 at 6:58 PM, Wilson,Randy rwilson@msh.org wrote:

Hi Hannan,

I think you should try Kenneth’s java application. We created 40,000 users (community health workers with their phone numbers and orgunit link) and assigned them all passwords using the app. I think Kenneth has put in a User interface that lets you specify the server address, DHIS-2 instance or database, etc…

Kenneth could you send Hannan a sample csv file (just 10 records or so) along with your application, so he can test it out. I think it is sufficiently generic.

He sent a link to it in an earlier response. This file is quite big – 54 meg - Kenneth, can it be shrunk a bit more?

If you have java on your Windows computer you should be able to run it as follows:

Java –jar user_importer.jar

Randy

From: Dhis2-users [mailto:dhis2-users-bounces+rwilson=msh.org@lists.launchpad.net] On Behalf Of Hannan Khan

Sent: Thursday, May 08, 2014 1:09 PM

To: Lars Helge Øverland

Cc: dhis2-users@lists.launchpad.net; DHIS 2 developers

Subject: Re: [Dhis2-users] Creation of bulk user.

Hi Lars

Thanks. Yes restarting tomcat can generate the blank UID.

UID is a indexed field so I cannot create more than one user in one go. Is there any solution?

Regards

Hannan

On Wed, May 7, 2014 at 2:38 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi,

it is correct that missing UIDs will be generated on system startup.

I think what is being referred to here is dhis UID and not an UUID. There are ways to generate dhis UIDs through the web api but it’s just much simpler to restart tomcat.

regards,

Lars

On Wed, May 7, 2014 at 10:19 AM, Knut Staring knutst@gmail.com wrote:

The easiest is to restart DHIS2 (Tomcat)

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,

This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

Dear All,

Thanks you very for your help and help me a lot to create a a java class that can read excel file and create a bulk user at a time. i will add that class soon here.

Thanks

Best Regards

···

On Fri, May 9, 2014 at 3:51 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Just wanted to mention that we are now planing to add this functionality to 2.16, it will work as /api/users today (allows creating one user with password etc), but will support bulk import of users + passwords through our meta-data import (/api/metadata), there will be no export of passwords, but we will allow creating of users with password, and also updating, you can send passwords as plaintext, and it will be hashed on the server (please use https for this)


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Fatema Uddin ----------------------------------------

Technical Advisor HIS

Priority Area Health

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

Office location:

Room # 304, Shshid Dr.Milan Bhavan, Management Information System,

Directorate General of Health Services of MoHFW,

Mohakhali, Dhaka-1212, Bangladesh

Phone: +880 2 881 64 59

Fax: +880 2 881 38 75


Morten

On Fri, May 9, 2014 at 11:44 AM, Knut Staring knutst@gmail.com wrote:

For Mysql, i think you could do this in postgres first, then do a metadata export to mysql and finally use sql to bring over the generated passwords.

On 9 May 2014 10:52, “Kenneth Børtveit” kenneth.bortveit@gmail.com wrote:

Alright. Are you using postgres? If not, this will not work.

Select the by pressing the select button.

In this case, the firstname and surname is in the csv file. Surname in the first column, 0, and firstname in the second column, 1. Select the csv radio button and the right column. Probably already selected.

The username can be made by a combination of the firstname and lastname, then select split+count. If some are equal, numbers will be added.

The random password should just create a random password.

!This is not secure random, just a random string from java!

One needs to enter the right database connection parameters in order to load user roles and orgunits. Or one can use organization unit id or code from the database. The id can be found in the database, codes are usually made manually in DHIS2. We used the codes from the csv file to assign orgunits, column 19.

  1. Enter the correct database parameters.
  1. Exclude incomplete users will not create users that are missing some of the information.
  1. Make csv of imported users, creates a csv file with the usernames and passwords.
  1. Make csv of incomplete records creates a csv file with the users that are missing data.
  1. The files can be found in the same directory as the selected file.

Let me know if there are any trouble.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

2014-05-09 7:00 GMT+02:00 Hannan Khan hannank@gmail.com:

Thanks Randy

We are trying with Kenneth’s Java application; if we have the sample csv file it will be very help full for us.

Dear Kenneth

Can you please send me a sample CSV file.

Regards

Hannan

On Thu, May 8, 2014 at 6:58 PM, Wilson,Randy rwilson@msh.org wrote:

Hi Hannan,

I think you should try Kenneth’s java application. We created 40,000 users (community health workers with their phone numbers and orgunit link) and assigned them all passwords using the app. I think Kenneth has put in a User interface that lets you specify the server address, DHIS-2 instance or database, etc…

Kenneth could you send Hannan a sample csv file (just 10 records or so) along with your application, so he can test it out. I think it is sufficiently generic.

He sent a link to it in an earlier response. This file is quite big – 54 meg - Kenneth, can it be shrunk a bit more?

If you have java on your Windows computer you should be able to run it as follows:

Java –jar user_importer.jar

Randy

From: Dhis2-users [mailto:dhis2-users-bounces+rwilson=msh.org@lists.launchpad.net] On Behalf Of Hannan Khan

Sent: Thursday, May 08, 2014 1:09 PM

To: Lars Helge Øverland

Cc: dhis2-users@lists.launchpad.net; DHIS 2 developers

Subject: Re: [Dhis2-users] Creation of bulk user.

Hi Lars

Thanks. Yes restarting tomcat can generate the blank UID.

UID is a indexed field so I cannot create more than one user in one go. Is there any solution?

Regards

Hannan

On Wed, May 7, 2014 at 2:38 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi,

it is correct that missing UIDs will be generated on system startup.

I think what is being referred to here is dhis UID and not an UUID. There are ways to generate dhis UIDs through the web api but it’s just much simpler to restart tomcat.

regards,

Lars

On Wed, May 7, 2014 at 10:19 AM, Knut Staring knutst@gmail.com wrote:

The easiest is to restart DHIS2 (Tomcat)

On Wed, May 7, 2014 at 10:14 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

If it is blank then the database will regenerate it automatically when you restart (I think. This is what happens with other objects which have a uuid). That is the easiest way.

If you are preparing SQL for injection of the users and you want to pregenerate them, you can use which ever tool you are using to generate the SQL to provide you UUIDs as well. Postgresql’s uuid-ossp package, R’s “uuid” package, or the system command “uuid” on Linux are all ways of getting them. I am sure they can be done easily in Java or other languages. So, it really depends on which tools you are using to prepare the SQL for inserting them into the DHIS2 database.

Regards,

Jason

On Wed, May 7, 2014 at 10:07 AM, Hannan Khan hannank@gmail.com wrote:

No. It seems that uuid is not automatically generated. Please suggest.

Regards

Hannan

On May 7, 2014 1:34 PM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

The UUID will be generated automatically, so no need to worry about it.

Regards,

Jason

On Wed, May 7, 2014 at 9:29 AM, Hannan Khan hannank@gmail.com wrote:

Thanks Jason. Password issues are there and we are trying with that but what about the UUID?

Regards

Hannan

On Wed, May 7, 2014 at 12:14 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Hannan,

This has been discussed (again) recently on this list.

http://dhis-developers-list.1563109.n2.nabble.com/Password-Generation-td7590749.html#a7590750

http://dhis-developers-list.1563109.n2.nabble.com/USERS-Password-td7591703.html#a7591704

There are a few more as well in the archives if you dig a bit.

Regards,

Jason

On Wed, May 7, 2014 at 8:10 AM, Hannan Khan hannank@gmail.com wrote:

Dear Experts

We are in a need of creating bulk users (8000) and org unit assignment. I created script for testing but facing problem populating password and UUID. Please advice how can I do that?

I try to update password using crypt function and gen_salt function but the length of the password are different and doesn’t working. Please advise.

Regards

Hannan Khan


Senior Technical Advisor - Health Information Systems

Health Sector

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

T +880-2- 8816459, 8816412 ext 118

F +88 02 8813 875

M+88 01819 239 241

M+88 01534 312 066

E hannan.khan@giz.de

I www.giz.de

S hannan.khan.dhaka

B hannan-tech.blogspot.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org