Follow us on Twitter...
Stay up to date with the latest news, special offers and advice from CensorNet on Twitter... we are Tweeting regularly!
CNLoginAgent is a small executable that can be run from a Windows login script when the user logs in. CNLoginAgent will send the domain username and computer information to CensorNet to identify the web requests being made from that computer.
To enable the use of the CNLoginAgent executable, you should log into the CensorNet Professional web console and go to Objects -> Configuration -> User Authentication.
Normally, if you use CNLoginAgent it is because you do not have an alternative authentication option such as Active Directory and you do not want to prompt users to login each time they open a web browser. Therefore, User Authentication Source is usually set to No Authentication, however CNLoginAgent can also be used in conjunction with other authentication methods (we don't recommend it, as it may be confusing in the reports).
Ensure that Enable ADAgent Service is ticked and that you enter the following into the Secret key field:
032bd949e4eaa9152de9d4d02914f728

Save the changes.
Download the CNLoginAgent executable:
You can place the executable on each PC, or on a shared network drive, so that you can access it from scripts.
You can run the executable manually, as follows:
CNLoginAgent.exe <ip.of.censornet> 8080 login
Replacing <ip.of.censornet> with your CensorNet server IP address. You should see a result such as:

You should now configure a browser to use the CensorNet server IP as a proxy and browse to some web pages. Check the Who's Browsing report within CensorNet Professional to see that you have been identified as the local computer user, by CNLoginAgent:
![]()
If you are having problems, you can use the "debug" option to display the information that CNLoginAgent has collected about the currently logged in user. For example:
CNLoginAgent 10.0.0.20 8080 debug
Will output something similar to:

If possible, it makes sense to run the CNLoginAgent on a schedule to ensure that CensorNet Professional is updated with the latest user and IP address information. You can set it up as a scheduled task in Windows to run periodically, either 15 minutes or 1 hour.
You can run the CNLoginAgent exectable for a Windows login script. An example is below:
rem CNLoginAgent script
if exist Y:\CNLoginAgent.exe goto agentexists
echo No local agent, copying
copy \\server\tools\network\CNLoginAgent\CNLoginAgent.exe Y:\
Y:\CNLoginAgent.exe 192.168.1.250 8080 login
goto done
:agentexists
Y:\CNLoginAgent.exe 192.168.1.250 8080 login
goto done
:done
echo User has logged in to CensorNet
For further information about logon scripts please see http://technet.microsoft.com/en-us/library/cc750843.aspx