How to manage Hyperglance users

Hyperglance holds its own internal database of users and we have shell scripts that you can use to manage users.

By default Hyperglance has a single admin user whose username is 'admin'.


See scenario examples at the bottom of the page to get started quickly!

User Management Scripts


Our user management scripts are located in /usr/local/bin/users

adduser.sh

Adds a user to the database. The user is created with no roles and will not be able to login, so must be followed up with a call to setroles.sh to assign appropriate roles.

adduser.sh <username> [password]
  • username - Required. A unique username to create.
  • password - Optional. The password of the user. If not provided as a parameter argument then the script will interactively prompt to enter a password (and again to confirm).

deleteuser.sh

Removes a user from the database.

removeuser.sh <username>
  • username - Required. The name of the user to remove.

listusers.sh

Prints out all users in the database.

listusers.sh

resetpassword.sh

Modifies the password of an existing user.

resetpassword.sh <username> [password]
  • username - Required. The name of a user whose password will be changed.
  • password - Optional. The password of the user. If not provided as a parameter argument then the script will interactively prompt to enter a password (and again to confirm).

setroles.sh

Assigns (or re-assigns) a set of roles to an existing user.

The script will automatically include the most basic "HyperglanceUser" role which is enough to grant read-only login ability to a user (although additional roles are needed to grant access to view topologies).

Learn more about how roles work in Hyperglance's RBAC system.

setroles.sh <username> [roles]
  • username - Required. The name of a user to grant roles to.
  • roles - Optional. A comma-separated list of roles to assign to the user. The "HyperglanceUser" role is always implicitly granted by the script and does not need to be included.

Scenario Examples

Add an admin user:

cd /usr/local/bin/users
./adduser.sh kirk
./setroles.sh kirk HyperglanceAdmin

Change the password of the default 'admin' user:

cd /usr/local/bin/users
./resetpassword.sh admin

Add a user who can view (read-only) your 'prod' topology:

cd /usr/local/bin/users
./adduser.sh john
./setroles.sh john prod

Add a user who can view and trigger actions against (read/write) your 'prod' topology:

cd /usr/local/bin/users
./adduser.sh alice
./setroles.sh alice HyperglanceActionsUser,prod

Add a power user who can do everything except for administration duties:

cd /usr/local/bin/users
./adduser.sh barney
./setroles.sh barney HyperglanceRole_ViewAllTopo,HyperglanceRole_Actions,HyperglanceRole_Rules