Adding users using dspace command line

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding users using dspace command line

Keir Vaughan-Taylor-3
Usually users log in and are added to the eperson list by being
authenticated through LDAP. They usually are added with limited access
and later as required I manually upgrade their access privileges.

I have a need to batch add a set of users and put them into a specific
access group and have them later authenticated with LDAP.

I could get the users all to initially login, be authenticated by LDAP
and then manually adjust their permissions later. A bit of a drudgery
task but I would be happy to do this except that consensus is that this
is too onerous for the poor users as they want to log in and get their
stuff without delay

I know their user ids but not their passwords or details.

It would be good to use <dspace>/bin/dspace user --add <whatever>
but this won't run unless given a password and is likely to want user
details  which we want to be obtained from the LDAP server.

Does anyone have a suggestion?


--
Keir Vaughan-Taylor
ERA DSpace Administrator
Rm:123 Fisher Library University of Sydney
[hidden email]
ph:+61 2 9351 7408
mb:+61 434 606 885


------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Reply | Threaded
Open this post in threaded view
|

Re: Adding users using dspace command line

helix84
Hi Keir,

this is the code of the --add command:

https://github.com/DSpace/DSpace/blob/dspace-4_x/dspace-api/src/main/java/org/dspace/eperson/EPerson.java#L1284

You could either modify it directly or, if you don't want to rebuild
and redeploy DSpace, you could reuse the code in a curation task:

https://wiki.duraspace.org/display/DSDOC4x/Curation+System


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette