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
Last revisionBoth sides next revision
en:user_advanced:gs3_user_management [2021/09/21 02:41] – [Command line editing of users] kjdonen:user_advanced:gs3_user_management [2021/09/21 02:56] – [Viewing and Editing the database via a text file] kjdon
Line 30: Line 30:
  
 Or you can directly use the java class.\\ Or you can directly use the java class.\\
-Make sure you have run **source gs3-setup.sh** (linux/Mac) or **gs3-setup.bat** (windows) and  +Make sure you have set up the Greenstone environment by running **source gs3-setup.sh** (linux/Mac) or **gs3-setup.bat** (windows). Also, start the derby server if its not already running:  **ant start-derby**if Greenstone is running, then the derby server will be running.
-**ant start-derby** (if greenstone or the derby server is not already running)+
  
 <code> <code>
Line 52: Line 51:
 <code>java org.greenstone.gsdl3.ModifyUsersDB <path-to-greenstone3>/web/etc/usersDB ALL  addgroups=student</code> <code>java org.greenstone.gsdl3.ModifyUsersDB <path-to-greenstone3>/web/etc/usersDB ALL  addgroups=student</code>
  
 +The **-noAdd** option will **not** create a new user if the specified username does not exist.
  
 +==== Viewing and Editing the database via a text file ====
 +
 +There are 2 java programs which help you view and edit the database: usersDB2txt and txt2usersDB
 +As above, you must set up the greenstone environment, and make sure the derby server is running.
 +
 +They are run like:
 +<code>
 +java org.greenstone.gsdl3.util.usersDB2txt <path-to-gs3>/web/etc/usersDB >& usersDB.txt
 +
 +... edit the file if necessary, then regenerate the DB:
 +
 +java org.greenstone.gsdl3.util.txt2usersDB usersDB.txt <path-to-gs3>/web/etc/usersDB [-append]
 +</code>
 +The **-append** option means append the contents of the file into the DB. Without it, the current contents will be deleted.
  
 ==== Setting up the Recaptcha test for User Registration ==== ==== Setting up the Recaptcha test for User Registration ====
en/user_advanced/gs3_user_management.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1