This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.

Authentication

When I attempt to access certain parts of Greenstone I'm asked for a username and password. What do I enter?

The initial username required here is admin.

If you installed Greenstone using the InstallShield installer on Windows or the Install.sh script on Unix you should have been asked to set a password during the installation procedure.

If you didn't, don't worry, the password defaults to being admin.

So if you don't know what to enter you should try username = admin, password = admin.

I've lost my username and password, what can I do?

(With instructions by Diego Spano.)

User account details are stored in etc/users.gdb.

There are several ways in which to reset your admin account's password. If you have the admin account's authentication details, you can reset the password for other users.

Option 1

In greenstone/bin/script you have a perl script called "csv-usernames-to-db.pl". This program converts username details (password, group information etc) into the format used by Greenstone, and stores them in etc/users.gdb.

Do the following:

1. Create a text file named myusers.csv and add the following line inside:

Tom,123456,administrator

2. open a terminal

3. move to Greenstone root folder.

4. Run setup.bat (Windows) or setup.bash

5. Run "perl -S csv-usernames-to-db.pl /path_to_file/myusers.csv"

With this script you will create a user named Tom, with password "123456" that belongs to administrator´s group. Log in with Tom and now you will be able to edit admin user and change his password. This way you will not delete all the other users you had defined previously.

Option 2

1. If you're admin, then open a terminal. To set the admin password on Linux, you can run:

./gsicontrol.sh configure-admin

and on Windows:

gsicontrol.sh configure-admin

2. If your admin account is working fine, then make sure you've enabled the Administration pages. You can do this by opening etc/main.cfg in a text editor and changing the line that says:

status    disabled

to

status    enabled

3. Go to your Greenstone home page, click on the Administration Page button and, in the page that then loads, click on the List Users link to the left.

4. Login with the admin account. Then select the user whose password you want to reset by pressing the Edit button and filling in the new details.

Option 3

Delete the file greenstone/etc/users.gdb. Then go to admin page and log in with user admin. The password now defaults to "admin". Once logged in you can change your password. With this method you get access to the system but you are deleting all the other users you had defined.

Can I password protect a collection?

Yes. This feature is not currently available through the Librarian Interface. Please close the collection if it is open in the Librarian Interface. Edit the GSDLHOME/collect/<collname>/etc/collect.cfg file, and add the following lines:

authenticate collection auth_groups <groupname> [<groupname> …]

You may have to restart the Greenstone server for the changes to take effect.

The auth_groups line specifies the user group(s) which have access to the documents. To access a protected collection, a person must have a user name and password, and this user name must belong to one of the specified groups. See below for how to add new users and set their groups.

IMPORTANT NOTE: In Greenstone 2.82 and earlier, use auth_group instead of auth_groups (both will still be recognised in later Greenstone versions).

Can I password protect just certain documents in a collection?

Yes. This feature is not currently available through the Librarian Interface. Please close the collection if it is open in the Librarian Interface. Edit the GSDLHOME/collect/<collname>/etc/collect.cfg file, and add the following lines:

authenticate document auth_groups <groupname> [<groupname> …]

The auth_groups line specifies the user group(s) which have access to the documents. To access a protected collection, a person must have a user name and password, and this user name must belong to one of the specified groups. See below for how to add new users and set their groups.

IMPORTANT NOTE: In Greenstone 2.82 and earlier, use auth_group instead of auth_groups (both will still be recognised in later Greenstone versions).

Then add either of the following two lines: private_documents <oid> [<oid> …] public_documents <oid> [<oid> …]

These two lines specify a list of document identifiers (ex.Identifier in the Enrich pane). Using private_documents, all specified documents will be password protected, while any others are freely accessible. Using public_documents, all specified documents will be freely available, with all others password protected.

Is there a demo collection that uses authentication?

Yes. Please see the Formatting and Authentication demo collection.

How do I create a new user?

You need to use the administration facility. You can access the administration page by clicking the Administration Page button on the home page of your Greenstone installation. If this is not present, enable it by setting status to enabled in the GSDLHOME/etc/main.cfg file.

From the administration page you can list users and add new users by clicking the links down the left hand side of the page. You will need to use the admin account that was set up when you installed Greenstone.

You can change the properties of an existing user by clicking the edit link from the list users page.

If you are adding users to access a protected collection, make sure you add the required group into the groups field.

How do I get usage information for my library?

You can enable usage logging by setting the logcgiargs option to true in greenstone/etc/main.cfg. This saves a log in greenstone/etc/usage.txt. The log entry is basically a list of cgi arguments. One entry is generated for each page request to the library.

You can find out what the cgi arguments mean by going to the Administration page of your Greenstone installation, or from this page.