Highlighted
Anonymous_User Absent Member.
Absent Member.
9749 views

Proxy list report

I am needing to generate a list of all accounts and the proxy access granted from each one. I have found proxy.pl however, when I run GWCheck from C1 setting it to user databases only and verbose logging the PO is tanking. Any other options out there or will they all require the gwcheck log configured as stated previously?
Labels (2)
0 Likes
1 Reply
bvandenberg1 Absent Member.
Absent Member.

Re: Proxy list report

It can be done using the GroupWise Admin API to generate a list of users and the GroupWise Object API to login to each mailbox and output the proxy list. Below are two Visual Basic scripts - listActiveUsers.vbs and listProxy.vbs

listActiveUsers.vbs

option explicit

' Define constants

const DomainPath = "f:\gwdom"

' Define variables

dim GWSystem
dim GWUser

'create connection to GroupWise

set GWSystem=CreateObject("NovellGroupWareAdmin")
GWSystem.Connect( DomainPath )

for each GWUser in GWSystem.Users

' list accounts that are disabled and are not expired

if GWUser.disableLogin = FALSE and ( GWUser.MailboxExpDate = 0 or GWUser.MailboxExpDate > now() ) then
wscript.echo GWUser.Name
end if

next

listProxy.vbs

option explicit

' Define constants

const TrustedApp = "ProxyReport"
const TrustedAppKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

' Define variables

dim stdin
dim GWApplication
dim GWAccount
dim GWAccountRights
dim UserName

' Connect to GroupWise with trusted application key

set GWApplication = CreateObject("NovellGroupwareSession")
call GWApplication.SetTrustedApplicationCredentials(TrustedApp, TrustedAppKey)

' Open standard input

set stdin = wscript.stdin

do while not stdin.atendofstream

' Read in user name

UserName = stdin.readline

' Login to GroupWise

set GWAccount = GWApplication.MultiLogin(UserName)

' Write out <All User Access> proxy access rights

wscript.echo GWAccount.Owner.DisplayName & "," _
& "<All User Access>" & "," _
& GWAccount.DefaultAccountRights.BitMask

' Write out user proxy rights

for each GWAccountRights in GWAccount.AccountRights

wscript.echo GWAccount.Owner.DisplayName & "," _
& GWAccountRights.Address.DisplayName & "," _
& GWAccountRights.BitMask

next

' Log out from GroupWise

set GWAccount = Nothing

loop



Copy the scripts to a folder.
Open a command window and change the current working directory to the folder that contains the scripts.
Open listActiveUsers.vbs with a text editor ( i.e. NotePad ) and modify the DomainPath constant to a GroupWise domain folder.
Run the listActiveUsers.vbs using cscript - i.e. 'cscript /nologo listActiveUsers.vbs'. This will output a list of users to the screen. The output can be directed to a text file - i.e 'cscript /nologo listActiveUsers.vbs > gwusers.txt'.

Create a trusted application key using ConsoleOne.
Open listProxy.vbs with a text editor and modify the TrustedApp and TrustedAppKey constants accordingly.

I advise testing listProxy.vbs by editing gwuser.txt to include with a few select accounts. Run listProxy.vbs script using cscript - i.e. 'type gwuser.txt | cscript /nologo listProxy.vbs'. It should output the proxy list for each user in gwuser.txt in CSV format.

If satisfied with the results rerun 'cscript /nologo listActiveUsers.vbs > gwusers.txt' to create a complete list and run 'type gwuser.txt | cscript /nologo listProxy.vbs > proxyreport.csv'. If you are feeling adventurous listActiveUsers.vbs could pipe its output directly to listProxy.vbs - i.e 'cscript /nologo listActiveUsers.vbs | cscript /nologo listProxy.vbs > proxyreport.csv'.

The proxyreport.csv file can be imported into Excel for formatting. The proxy rights are output as a bit map. The bit map is:

1 - The user can archive messages.
2 - The user can modify preferences, rules, and groups.
4 - The user can read appointments.
8 - The user can read mail and phone messages.
16 - The user can read notes.
32 - The user can read private messages.
64 - The user can read tasks.
128 - The user can receive alarms.
256 - The user can receive notifications.
512 - The user can write appointments.
1024 - The user can write mail and phone messages.
2048 - The user can write notes.
4096 - The user can write tasks.

I suggest that you refer to the Cool Solutions article I wrote "Scripting GroupWise" - Scripting GroupWise | Novell User Communities for more information on the GroupWise Admin API.

Good luck.

Bryan Vandenberg

isutton;2268006 wrote:
I am needing to generate a list of all accounts and the proxy access granted from each one. I have found proxy.pl however, when I run GWCheck from C1 setting it to user databases only and verbose logging the PO is tanking. Any other options out there or will they all require the gwcheck log configured as stated previously?
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.