|Home | Product Information ||
Collecting Network Data from the Environment
SUMMARY : The NetKeeper® audit utilities can be setup to collect network ID data from environment variables. This feature is useful if your network shell is not returning the correct values to NetKeeper. The network ID data includes the user’s login name and the network and node address. The enclosed example explains the changes required for Novell® networks. Similar changes can be implemented on almost any network.
STEPS REQUIRED TO IMPLEMENT CHANGE
MODIFY YOUR LOGIN SCRIPT
Add commands to your Novell Login script to copy the network variables into environment variables. Use the Novell DOS SET command to copy the data into environment variables.
DOS SET FullName = "%FULL_NAME"
DOS SET LoginName = "%LOGIN_NAME"
DOS SET NetAddress = "%NETWORK_ADDRESS"
DOS SET NodeAddress = "%P_STATION"
Add the above commands to a login script that is executed by every user upon login. The case of the Novell system variables is important. Use the same case as the above example or the environment variables will not be correct.
CREATE A BATCH FILE TO RUN THE AUDIT UTILITIES
Create a batch file to run the audit utilities HARDADT.EXE, CFGADT.EXE and SOFTADT.EXE. Be consistent, if you use the same method for collecting network data in all instances that you run the audit utilities. Otherwise you may add duplicate data into your NetKeeper database.
In each case where you run the audit utility, replace the audit utility with a CALL to the sample batch outlined below.
The following example runs the HARDADT.EXE audit utility. Make similar batch files for CFGADT.EXE and SOFTADT.EXE.
REM Batch file to run hardadt with options to collect the
REM network information from environment variables.
REM Use this technique if the shell returns incorrect data.
REM if the network shell returns incorrect information
REM Add to your Novell(R) login script the following lines to
REM load the network data into environment variables.
REM DOS SET FullName = "%FULL_NAME"
REM DOS SET LoginName = "%LOGIN_NAME"
REM DOS SET NetAddress = "%NETWORK_ADDRESS"
REM DOS SET NodeAddress = "%P_STATION"
REM You can CALL this batch file from your existing batch files
REM Change and reference to hardadt to CALL HADT
REM You also need to make similar changes to calls to CFGADT.EXE and
REM IF %LoginName%!==! GOTO BADEND
IF %NetAddress%!==! GOTO BADEND
IF %NodeAddress%!==! GOTO BADEND
hardadt [EU=LoginName [EA=NetAddress [EN=NodeAddress
echo Netkeeper(R) did not run.
HADT.BAT batch file to collect data from the environment
The above batch file adds command line parameters to the HARDADT.EXE audit utility. The command line parameters tell NetKeeper to retrieve the network ID data from the environment data. See your NetKeeper manual under COMMAND LINE PARAMETERS for additional information on command line parameters for the audit utilities.
UPDATE ALL INSTANCES OF THE AUDIT UTILITIES WITH THE NEW BATCH FILE
Replace all instances where you run the audit utilities with a call to the new batch file. For example :
Original call :
New call :
Don’t forget to change the batch files used to audit a computer from within the NetKeeper programs. The batch files are DOHARD.BAT and DO SOFT.BAT in your NetKeeper directory.
Return to Tech Bulletin Menu