#15718 - 2002-01-04 06:25 PM
Trying to solve Concurrent Logons
|
rlbrl
Fresh Scripter
Registered: 2002-01-04
Posts: 8
|
First of all, this is my first time writing a script. So......*smile*....forgive me for my ignorance.I am running on Windows 2000 Server with Active Directory setup. I have Win95, Win98, and Win2000 Clients. I am trying to solve an issue with the same user logging onto more than one computer. All I want to do is, when a user logs on, my script will check to see if the username is being used anywhere else. If it is, the system will logoff and require a new logon. Does anyone have any suggestions? Thanks in advance. Randy
|
|
Top
|
|
|
|
#15721 - 2002-01-04 07:21 PM
Re: Trying to solve Concurrent Logons
|
rlbrl
Fresh Scripter
Registered: 2002-01-04
Posts: 8
|
Thanks for your quick responces. I have been reasearching this topic off and on for almost 6mths. Security is not really an issue but simplicity for the user is. I am a VAR and we have systems all over the State. We are trying to make things as easy as possible for not only us but the custoomer. I came to Kixtart because I could see the possibilies of future use on forcing updates. So......I am trying to learn. Thanks again for your help. Randy
|
|
Top
|
|
|
|
#15722 - 2002-01-04 08:17 PM
Re: Trying to solve Concurrent Logons
|
rlbrl
Fresh Scripter
Registered: 2002-01-04
Posts: 8
|
Can anyone tell me where to look to see if someone is logged on?Thanks Randy
|
|
Top
|
|
|
|
#15724 - 2002-01-06 12:00 AM
Re: Trying to solve Concurrent Logons
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
|
|
Top
|
|
|
|
#15725 - 2002-01-06 05:38 AM
Re: Trying to solve Concurrent Logons
|
Anonymous
Anonymous
Unregistered
|
Incidently, (and I apreciate that this is an off topic) I have had problems that the NTname method has exposed. I have NT Terminal servers running Citrix metaframe that disconnect users after 20 minutes idle time and then log them off after 2 hours. However nbtstat indicates that loads of users are logged onto the server when they have in fact long since disconnected. The only way to resolve this that I have seen is to reboot the terminal server in question. anyone got any theories on this? or should I get my self motivated, collect some proper data and log a call with microsoft....
|
|
Top
|
|
|
|
#15727 - 2002-01-07 02:09 AM
Re: Trying to solve Concurrent Logons
|
rlbrl
Fresh Scripter
Registered: 2002-01-04
Posts: 8
|
Thanks everyone. After going through all the helpfull messages from the past I see this has been a subject of concern....*smile*. Thanks for your patients and I will now attempt to resolve my problem.Randy
|
|
Top
|
|
|
|
#15728 - 2002-01-15 08:09 PM
Re: Trying to solve Concurrent Logons
|
rlbrl
Fresh Scripter
Registered: 2002-01-04
Posts: 8
|
Ok everyone, thanks for your help and direction on my first attempt to write scripts. Here is what I have come up with on logging on a user. Thus far......*smile*. It appears to work. If anyone has anymore suggestions or if this helps anyone else. Let me know.Thanks!!! Out of all the bullentin boards I am a member of, this one has been the most productive in such a short amount of time. Randy $LoggedOnTo=READPROFILESTRING("\\SERVER\NETLOG\@USERID.TXT","@USERID","LoggedOnTo") OPEN (1,"@USERID.TXT",0) IF @ERROR <> 0 GOTO "NewLogIn";If file isnot found this must be a new login. ENDIF $X = READLINE(1) $X = READLINE(1) $XX = INSTR("$X","@WKSTA");Looking for string on line 2 that = @wksta IF $XX = 0 GOTO "OFFLOG";Found string. This means user is logged on to another machine. ENDIF $LoggedOnTo=READPROFILESTRING("\\SERVER\NETLOG\@USERID.TXT","@USERID","LoggedOnTo") WRITEPROFILESTRING("\\SERVER\NETLOG\@USERID.TXT","@USERID","LoggedOnTo","@WKSTA") messagebox("@USERID","Logon is Complete",016) EXIT :OFFLOG IF @INWIN > 1 GOTO "EXIT9X";This will logoff Windows9x. ENDIF MESSAGEBOX("$LoggedOnTo","You are currently logged on to....",016) $RC = LOGOFF(1);This will logoff Windows2000 EXIT :EXIT9X MESSAGEBOX("$LoggedOnTo","You are currently logged on to....",016) RUN @LDRIVE + "\\SERVER\NETLOG\LOGOFF.EXE /N" QUIT :NewLogIn CLOSE(0) WRITEPROFILESTRING("\\SERVER\NETLOG\@USERID.TXT","@USERID","LoggedOnTo","@WKSTA") messagebox("@USERID","New Logon is Complete",016) EXIT
|
|
Top
|
|
|
|
#15729 - 2002-01-24 04:57 PM
Re: Trying to solve Concurrent Logons
|
Anonymous
Anonymous
Unregistered
|
Eeeehhh..... I haven't tried it (yet), but I wonder what happens if a user logs on to one machine, then logs off. (at this point there is a .txt-file on the server, with the machinename inside...) Now the user logs on to a new machine... Won't the script believe that the user is logged on somewhere else??[ 24 January 2002: Message edited by: Frippe ]
|
|
Top
|
|
|
|
#15730 - 2002-10-05 04:46 PM
Re: Trying to solve Concurrent Logons
|
mulscully
Fresh Scripter
Registered: 2002-10-04
Posts: 10
|
has anyone tried the above script, that is someone logs in then logs out can they log back in??
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 764 anonymous users online.
|
|
|