Clear questions and runnable code
get the best and fastest answer
Generally the answer is no, but.. technically I think the answer might be yes if you can get your user to run a program (written in Perl though they don't need to know) to do so.
With the getpwuid command in Perl (or unix command line) you can get your login. I suppose the script could send this information in an encrypted signed hash as a cgi parameter to your server-side cgi program.
The information could be sent by having the client-side script open this composed URL in netscape. I sometimes use the following to open a picture in netscape.. probably this wouldn't be secure if you can read the source or replace it with your own script, so no guarantees. Also the URL would go out as cleartext if you are not running ssl.
The above code just opens a page in Mozilla. Possibly this kind of thing could be done in Windows too.
Update: I was thinking that this was a closed environment where you are running the server and everyone is logged in to it already. Otherwise, as Zaxo mentioned this is probably not a snooper script you will be able to get people to install. Was thinking of X based gui clients for astronomy or the mysql gui. Maybe not applicable to what you want to do.