I'm hoping someone can help me. The background to my problem is I need to restrict users on my domain to one login. It's a windows 2000 domain. Microsoft's recommended solution is to use Cconnect.exe which maintains a list of logged on users in an SQL database. But this list immediately becomes inacurate if a user doesn't loggof properly. with 15,000+ users many of them with basic IT skills only, resseting the logon count for people who dont loggof correctly will be a nightamre...

So I'm trying to write a Kix script which checks a particular drive share on a server to see if there is a session from that user already and if so logs them off. The following works fine for me.

$lanserv = GetObject("WinNT://servername/LanmanServer")

if @error <> 0
? @error + " / " @serror
else
for each $session in $lanserv.sessions
if $session.user = "username"
logoff(1)
end if
next
endif

But normal users dont have permissions to access the winNT object on the server.

Is there a way to specify a username to use when connecting to the object? Anyone have any ideas? Help would be very much appreciated!

Thanx
Talwyn