Article

PERL PERL - Web-display of Current NetWare Logins

About this article:

  • Using PERL to generates a HTML output of currently logged-in users on a Novell Netware system.
  • The PERL script runs on a regular PC logged in to the Novell server. This PC may also be running Apache webserver to serve the HTML file, which is the case here.

Script Language:
Perl

Name:
currentlogins.pl

Platform:
Win32 (for running script). Tested on NetWare 4.11, 5.0 & 6.0

Author:
Dr. Duncan J. Potter, 2005.

Requirements:

Features:

The Script

Using the Script Yourself

The above script may be freely copied and modified for use on your own site, only please retain the author information.
It is provided as is without warranty or support in the interests of sharing helpful information. The script is hard coded to refer to paths in use at this site but shouldn't be difficult to adapt to your own environment.

The contexts.txt file simply lists the NDS/eDirectory contexts to be scanned, one per line, e.g.

.mycontext.myOU.myORG
.myOthercontext.myOU.myORG

and the exclude.txt is simply a list of full names not to be displayed (not usernames, but the full name) e.g.

Dave Smith
Boris Kharlof

Running the Script Periodically

A variety of mechanisms may be used to call the script periodically. The one used here is to emply the (free) Sinc32 utility to call the Perl script every minute from a DOS batch file (this proved the easiest way). The format of the sinctab.stf file in which one specifies the items to be run is as follows:

# From left to right the time fields are:
#- minute
#- hour
#- day of month
#- month
#- day of week
#  Process to run
#
# Execute the Staff Logins batch file every minute.
* * * * * C:\stafflogins\stafflogins.bat

Good luck! :-)