A much simpler solution to this is to create a logon script with code that
looks kinda like:
$Domain = Win32::DomainName();
$User = Win32::LoginName();
$Machine = Win32::NodeName();
$LogFile = "\\\\soomeserver\\someshare\\logon.log";
if( open( LOG, ">$LogFile" ) )
{
# Exclusively lock the file so only you can modify it
flock( LOG, 2 );
# Make sure we flush output buffer for every write
my $BackupHandle = select( $InputFile );
$| = 1;
select( $BackupHandle );
# Seek to end of file in case someone else slipped in before
# you were able to lock the file and appended data
seek( LOG, 0, 2 );
print LOG scalar localtime, "\t$Domain\t$User\t$Machine\n";
# Unlock the file
flock( LOG, 8 );
close( LOG );
}
Alternatively you could submit a SQL commadn to some database updating it
(using ADO, ODBC, DBI or something else).
If you really want to use HTTP then simply turn off anonymous acess to the
script and turn on NTLM. This will force all browers to authenticate (hence
logging on using their NT credentials) and the script can call the first
three functions in the code above and write out their results to a log file.
Cheers,
dave
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 5:14 AM
To: [EMAIL PROTECTED]
Subject: Finding logged in users
Hi,
I dont know if this is possible but what I would like to do, possibly via
Lanman, is to run a Perl script on a web sever, that is able to
determine who is logged into the workstation and therefore who ran the
script.
In other words instead of anonymous users accessing web pages I can tell who
they are without putting them through the torture of logging in again.
Or does anyone have any other ideas.
I have full access to the development server so anything is possible. The
students currently log into an NT machine in order to use
the Institute's facilities.
Thanks
Roy
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin