Page 1 of 1 1
Topic Options
#15718 - 2002-01-04 06:25 PM Trying to solve Concurrent Logons
rlbrl Offline
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
#15719 - 2002-01-04 06:46 PM Re: Trying to solve Concurrent Logons
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Randy -
Welcome to the board!

Two suggestions:

1. Search the board, as this was covered extensively in previous posts. However, board was updated in the fall, so possibly these messages not available.

2. If possible, can also use User Manager to limit workstations user can login to. More extensive process at start, but more secure method.

Bill

Top
#15720 - 2002-01-04 06:55 PM Re: Trying to solve Concurrent Logons
krabourn Offline
Hey THIS is FUN
*****

Registered: 2000-12-11
Posts: 244
Loc: San Antonio, Texas, USA
I have been using a program called ntname to find what computer a person is on for a control program I made. You can find ntname at http://www.jsiinc.com/suba/tip0200/rh0296.htm.

The program was made for what you want.

krabourn

_________________________
Kelly

Top
#15721 - 2002-01-04 07:21 PM Re: Trying to solve Concurrent Logons
rlbrl Offline
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 Offline
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
#15723 - 2002-01-05 10:01 PM Re: Trying to solve Concurrent Logons
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Randy -
Okay, perhaps when I recommended 'Search the board' you were confused what I meant.

Select 'Search' from the top right corner of the screen, type in 'multiple logon', chose 'match all terms', select 'All Open Forums', press the 'Search' button. You will receive numerous matches including this link:
http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=000784

Bill

Top
#15724 - 2002-01-06 12:00 AM Re: Trying to solve Concurrent Logons
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Take a look a following topics which handles about "only logging on once"

http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=2&t=000300
http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=2&t=001530

http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=2&t=001564
http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=2&t=001382
greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#15725 - 2002-01-06 05:38 AM Re: Trying to solve Concurrent Logons
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
#15726 - 2002-01-06 07:30 AM Re: Trying to solve Concurrent Logons
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
John Mac,
With a little more coding logic, you could ascertain whether the current logon connection is to the TS and if so make an exception to the no concurrent rule.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#15727 - 2002-01-07 02:09 AM Re: Trying to solve Concurrent Logons
rlbrl Offline
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 Offline
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
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 Offline
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
#15731 - 2002-10-05 05:24 PM Re: Trying to solve Concurrent Logons
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I think the only viable solution is to create a personal user share and limit that share to one concurrent connection. If the user logs in the first time he can connect to his personal share successfully. However, if he tries ot log in to another computer he will exceed the maximum allowed number of connections to his personal share and the resulting ero message for the USE command will indicate that he's already connected once. Thus, the script can then for the logoff and promt a note about it. See Concurrent logins
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.068 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org