Re: [Dspace-tech] eperson and groups
On Fri, May 22, 2015 at 9:07 AM, Vegard Korvald wrote: > Is it possible to make groups with the CLI, similar to the «user» > command for creating users, or in any other way script this behavior? > Well again, not currently using CLI, but using SQL. This used to be just one insert, now it's two. Add a new row to the epersongroup table and its name to the metadatavalue table. INSERT INTO epersongroup (eperson_group_id) VALUES (nextval('epersongroup_seq')); INSERT INTO metadatavalue (metadata_field_id, resource_type_id, resource_id, text_value) VALUES ( (SELECT metadata_field_id FROM metadatafieldregistry WHERE metadata_schema_id = 1 AND element = 'title' AND qualifier IS NULL ), 6, currval('epersongroup_seq'), 'NEW_GROUP_NAME'); Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] eperson and groups
That worked like a charm, helix84! Is it possible to make groups with the CLI, similar to the «user» command for creating users, or in any other way script this behavior? -- Vegard From: ivan.ma...@gmail.com [mailto:ivan.ma...@gmail.com] On Behalf Of helix84 Sent: Thursday, May 21, 2015 12:57 PM To: Vegard Korvald Cc: dspace-tech@lists.sourceforge.net Subject: Re: [Dspace-tech] eperson and groups On Thu, May 21, 2015 at 12:22 PM, Vegard Korvald mailto:vegard.korv...@usit.uio.no>> wrote: I used "SELECT * FROM epersongroup " to get the IDs, but I couldn't seem to find the corresponding group name in the database. To find the name I had to look it up as an admin on our DSpace page under Access Control->Groups. Is there a way to find the IDs and names of the groups in the database? Sorry about that, I forgot to note that since DSpace 5, the epersongroup table changed due to the "metadata for all dspace objects" feature. You can get the same view on the table as in previous versions using this query instead (6 is the constant for group): SELECT e.*, m.text_value AS name FROM epersongroup e LEFT JOIN metadatavalue m ON ( m.resource_id = e.eperson_group_id AND m.resource_type_id = 6 ) Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] eperson and groups
If I'm not mistaken this only creates a user, and does not add it to an existing group. -- Vegard >-Original Message- >From: Daniel Francis [mailto:dan...@admin.udsm.ac.tz] >Sent: Thursday, May 21, 2015 2:39 PM >To: Vegard Korvald >Cc: dspace-tech@lists.sourceforge.net >Subject: Re: [Dspace-tech] eperson and groups > > >Dear Vergard, > >Perhaps this one will help. in your command line type the following then >(enter) > >/dspace/bin/dspace user -a -m sam...@yourdomain.com -g yourname -s >surname >User -p yourpassword > >sam...@yourdomain.com (email address) > >yourname (given name) > >surname (your surname) > >yourpassword (password) > >Regards. > >Daniel Francis. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] eperson and groups
Dear Vergard, Perhaps this one will help. in your command line type the following then (enter) /dspace/bin/dspace user -a -m sam...@yourdomain.com -g yourname -s surname User -p yourpassword sam...@yourdomain.com (email address) yourname (given name) surname (your surname) yourpassword (password) Regards. Daniel Francis. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] eperson and groups
On Thu, May 21, 2015 at 12:22 PM, Vegard Korvald wrote: > I used "SELECT * FROM epersongroup " to get the IDs, but I couldn't seem > to find the corresponding group name in the database. To find the name I > had to look it up as an admin on our DSpace page under Access > Control->Groups. Is there a way to find the IDs and names of the groups in > the database? > Sorry about that, I forgot to note that since DSpace 5, the epersongroup table changed due to the "metadata for all dspace objects" feature. You can get the same view on the table as in previous versions using this query instead (6 is the constant for group): SELECT e.*, m.text_value AS name FROM epersongroup eLEFT JOIN metadatavalue m ON ( m.resource_id = e.eperson_group_id AND m.resource_type_id = 6) Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] eperson and groups
Thank you, helix84! By using psql I could add an eperson into a group without any problems. I used "SELECT * FROM epersongroup " to get the IDs, but I couldn't seem to find the corresponding group name in the database. To find the name I had to look it up as an admin on our DSpace page under Access Control->Groups. Is there a way to find the IDs and names of the groups in the database? -- Vegard >-Original Message- >From: ivan.ma...@gmail.com [mailto:ivan.ma...@gmail.com] On Behalf Of >helix84 >Sent: Tuesday, May 19, 2015 1:15 PM >To: Vegard Korvald >Cc: dspace-tech@lists.sourceforge.net >Subject: Re: [Dspace-tech] eperson and groups > >I don't think it's doable with the currently available CLI commands in DSpace: >https://wiki.duraspace.org/display/DSDOC5x/Managing+User+Accounts > > >You could, however, use a CLI SQL client (psql) to manipulate membership in >the epersongroup2eperson table. You can find out the user and group IDs >from the eperson and epersongroup table, respectively. > >Alternatively, assuming you're using password authentication and want to put >all users into a single group, you can use the login.specialgroup option in >[dspace]/config/modules/authentication-password.cfg. Please note that >special group membership is dynamic - it doesn't appear in the >epersongroup2eperson table, but you can check effective membership in the >profile of a logged in user. > > >Regards, >~~helix84 > >Compulsory reading: DSpace Mailing List Etiquette >https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette > -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] eperson and groups
I don't think it's doable with the currently available CLI commands in DSpace: https://wiki.duraspace.org/display/DSDOC5x/Managing+User+Accounts You could, however, use a CLI SQL client (psql) to manipulate membership in the epersongroup2eperson table. You can find out the user and group IDs from the eperson and epersongroup table, respectively. Alternatively, assuming you're using password authentication and want to put all users into a single group, you can use the login.specialgroup option in [dspace]/config/modules/authentication-password.cfg. Please note that special group membership is dynamic - it doesn't appear in the epersongroup2eperson table, but you can check effective membership in the profile of a logged in user. Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
[Dspace-tech] eperson and groups
Hello, I'm new to DSpace and would be very greatful if one of you could help me with an issue. Is there a way to add an eperson into groups by using the command line tool or in any other way script it so that we dont have to do it manually? I know there's a solution with LDAP+AD, but unfortunately we can't use this method because we can't authenticate with LDAP. -- Vegard -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette