Finding Users by IP Address
Novell Cool Solutions: Tip
Digg This -
Posted: 4 Jan 2005
A reader recently asked: "How do you quickly find a user based on an IP address, without going through each user in ConsoleOne?"
Here are four solutions from various Forum experts, as well as some tips on login scripts that access IP addresses:
Solution #1: Use iMonitor
For a quick-and-dirty approach to finding users by IP address, just use Monitor. Scroll down to the user in question and look at the details.
Solution #2: Use NLIST
Use the following NLIST command:
NLIST /R /S > address.txt
This will dump user and Network Address stuff into a file then just open in notepad and search for the address, plus gives you a list for historical reasons. Here's a sample of what you might get:
Object Class: User Current context: OU.O User: testID Network Address: TCP/IP Network Address IP Address: 184.108.40.2061 Network Address: IPX/SPX Network Address Network: 18 Node: A0C01596DA Socket: 4088
Solution #3: Use JRB Utilities
Check out http://www.jrbsoftware.com. The JRB Utilities tool set is very handy to own. I use the GETREST.EXE command-line utility as follows:
Getrest * na /j /n /r /x /y=u /e=none /l=address.txt
The output in address.txt file will be similar to this:
testID.OU.OU 0000001b:00012345678c:4d98 220.127.116.111
Then you just open the file in Notepad and search for the address. It also gives you a list for historical purposes.
Solution #4: Old School, from School Cool
This next solution if from the Novell Coolsolutions.com forum (http://coolsolutions.com/forums). As they say it, this is some "Old School" stuff!
"If I want to to write a login scripts for logging the date, time, username, ipaddress to a log files at server, is it possible?"
Here is one way to do it. In the login script, set DOS variables for whatever values you want to keep. For example:
DOS SET User=%CN DOS SET LoginTime=%Last_Login DOS SET Address=%Network_Address
Then call a batch file from the login script as follows:
#cmd /c \\sys\etc\dothis.bat
Where the batch file contains something like this:
Echo %Login_Time% %Address% %User% >> \\sys\etc\Logfile.txt
The double ">>" will append the string to the file, and it will create a file if there is not one. This would also build a historical file on the fly.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com