Once you've got a Zegami server up and running the next step is to enable and configure local user authentication. This will allow collection administrators and managers to restrict access to a collection to individual users.

Enabling local user authentication has two main steps - updating the server configuration and creating an administrator user.

Enable Local Authentication

Local Authentication is enabled by editing the settings.conf file, which is where all the server settings are stored and configured.

  1. With a text editor open the settings.conf file. For Windows installations this is located at C:\Program Files\Zegami\conf\settings.conf and will need to be opened with a text editor like WordPad run as an Administrator. On Linux it is located at /opt/zegami/conf/settings.conf.
  2. Find the [auth] section and change the plugin value from NoAuth to LocalAuth. The updated [auth] section should now look like:

    [auth]
    #######################################################################################
    # Authorisation plugin to use
    #
    # Examples:
    #   * NoAuth:    No authentication required
    #   * LocalAuth: Use localised database for user registration and permission handling
    #   * LDAPAuth:  Use LDAP for authentication and use local database for collection
    #                permission handling
    #   * AAFAuth:   Use Rapid Connect AAF service for user authentication and use local
    #                database for collection permissions
    #######################################################################################
    plugin=LocalAuth
    # anonymous access for collections
    anonymous=False
    
  3. Save the file

Create an Administrator user

Now that Local Authentication has been enabled the next step is to create an administrator user. This can only be done via the Command Line Interface (CLI)

  1. Open the Command Prompt or Terminal and navigate to the Zegami installation directory. On Windows the command is cd C:\Program Files\Zegami and on Linux the command is cd /opt/zegami.
  2. Run the create user CLI command. On Windows: python zegami.pyc users create and on Linux: python bin/zegami.pyc users create
  3. Follow the prompts to create the new user:
    1. Username
    2. First Name
    3. Last Name
    4. E-mail
    5. Password
    6. Re-enter Password

Once the changes have been made the web server needs to be restarted.

Windows Desktop (e.g. 7, 8.1, 10)

The Zegami Web Service Windows service needs to be restarted. This can either be done from the services snap-in or via an administrative command prompt:

    net stop ZegamiWeb
    net start ZegamiWeb

Windows Server

The Zegami IIS Web Site needs to be restarted. This can be done either via the IIS Manager snap-in or via an administrative command prompt:

appcmd start | stop site /site.name:Zegami

Linux

The web service is managed by supervisor. To restart the services first start supervisorctl:

sudo supervisorctl

From the supervisor prompt run:

supervisor> restart zegami_uwsgi zegami_nginx
supervisor> exit