User Tools

Site Tools


en:user_advanced:gs3_user_management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:user_advanced:gs3_user_management [2018/09/25 01:18] – [Setting up the Recaptcha test for User Registration] kjdonen:user_advanced:gs3_user_management [2021/09/21 02:27] – [Command line editing] kjdon
Line 4: Line 4:
  
 (Note, The greenstone 2 version of this page can be found [[en:user_advanced:gs2_user_management|here]].) (Note, The greenstone 2 version of this page can be found [[en:user_advanced:gs2_user_management|here]].)
 +
 +The user DB (a derby database) can be found at greenstone3/web/etc/usersDB.
 +
 +===== User Registration =====
 +A user can register herself by visiting
 +http://host:port/greenstone3/library/admin/Register
 +This is linked to near the bottom of the default library home page. 
 +
 +Admin can register a new user by visiting the admin page: http://host:port/greenstone3/library/admin/ListUsers, then clicking the 'Add A New User' button.
 +
 +===== Command line editing =====
 +
 +**ant config-admin** - reset the admin password
 +**ant config-user** - add or edit users. This requires you to provide all user fields: username, password, groups, status, comment, email. They can be left blank, but it will override any previous values in the db.
 +
 +Or you can directly use the java class.
 +Make sure you have 'source gs3-setup.sh' (linux/Mac) or 'gs3-setup.bat' (windows)
 +**ant start-derby** (if greenstone or the derby server is not already running)
 +
 +<code>
 +java org.greenstone.gsdl3.util.ModifyUsersDB 
 +Usage: java org.greenstone.gsdl3.ModifyUsersDB <full_path_of_the_usersDB> <username|ALL> [-noAdd] [password=pwd] [groups=grp] [addgroups=grp] [accounstatus=status] [comment=cmt] [email=address]
 +</code>
 +
 +(Options valid for releases from September 2021)
 +Eg: To add a new user
 +java org.greenstone.gsdl3.ModifyUsersDB <path-to-greenstone3>/web/etc/usersDB kath password=changeme groups=student
 +
 +The 'groups' option will set the group field to the specified value.
 +The 'addgroups' option will add the specified groups to whatever groups exist already (if editing an existing user)
 +
 +Using username 'ALL' will perform the selected changes on all users.
 +For example, to add the 'student' group to all users, run
 +
 +java org.greenstone.gsdl3.ModifyUsersDB <path-to-greenstone3>/web/etc/usersDB ALL  addgroups=student
  
 TODO: TODO:
en/user_advanced/gs3_user_management.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1