How to find out a role of account used in gwadmin console.

  • 7023859
  • 08-May-2019
  • 08-May-2019

Environment

GroupWise 18
GroupWise 2014 R2
GroupWise 2014

Situation

Sometime you struggle with getting information via restAPI / curl script and a reason behind might be insufficient rights of account used.
Here are steps to find out roles known to GroupWise:

1. Create a temp directory on your server and then issue the first command to get a certificate downloaded:

sles-gw18:/ # mkdir aa
sles-gw18:/ # cd aa
sles-gw18:/aa # ll
total 0
sles-gw18:/aa # curl -k --user admin:novell -H "Accept:application/json" https://<IP of the primary domain>:9710/gwadmin-service/system/ca >> gwadmin.pem
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1099 100 1099 0 0 32323 0 --:--:-- --:--:-- --:--:-- 33303
sles-gw18:/aa # ll
total 4
-rw-r--r-- 1 root root 1099 May 8 09:10 gwadmin.pem

2. Now you can find out a role of used account:

sles-gw18:/aa # curl --cacert gwadmin.pem -k --user admin:npvell -H "Accept:application/json" https:///<IP of the primary domain>:9710/gwadmin-service/system/whoami
{"user":{"name":"admin"},"roles":["ROLE_SUPER_ADMIN","ROLE_ADMIN","SYSTEM_RECORD"]}
sles-gw18:/aa #

This is an example of superuser account registered in the GroupWise system.