DeepThoughts

17 Apr

How to find if a GroupWise user is logged in.

How to find out if a GroupWise user is logged in, without having to browse to the agents web portal.

This is a quick and easy bash script, so you’ll need either cygwin or a linux box to run to run it.

but you will be able to find if someone is logged into GroupWise from the command line. Its output is not very pretty yet, but its still a very early version. It would need to be customized for your site.

usage would be “gwloggedin.sh username”

it uses a for loop to loop through the ip address of your GroupWise po agents web portals, then uses wget to download a local copy of the page that lists the logged in users. it then grep’s through those pages for the name you are looking for. if they are logged on you will get a result also if they are being proxied. if their account is not currently being accessed you will get no result at all.  very beta version.

I’m hoping to add this to an auto post office migration script that will get a list of users from jrb utils. check to see if a user is logged in, if not then move them to a different post office.

#!/bin/sh
# Eugene Liedel liedele@gmail.com

# script gwloggedin.sh , usage gwloggedin.sh username
# 4/13/2009 11:46 AM — this script grabs the lists of logged in users
# from all the GroupWise web portal pages. saves them locally then
# greps them for the specified user name

# get pages from 10.10.10.108, 10.10.10.109 …etc.
for i in 08 09 10 11 12 13 14 15;
do wget -q –http-user=user –http-password=password -O /cygdrive/h/poliveusers-$i http://10.10.10.1$i:7181/conn;
done

echo “checking for user ” $1
grep -i –color=always $1 /cygdrive/h/poliveusers-*

Leave a Reply

© 2010 DeepThoughts | Entries (RSS) and Comments (RSS)

Design by Your Index - Powered By Wordpress