I'm changing passwords every so often with my VB.net app using the NetUserSetInfo API call.
I found that it is very slow, on a 3 GHz P4 it uses 18 seconds to change 100 passwords. Anyone
else have the same experience ? I know for a fact that the code works. My VB.net code is as
follows:
Public Sub ChangePasswords()
msgbox(now)
Dim i As Integer
For i = 0 To 100
Try
Dim retVal As Long
Dim servername As String = "WINXPPRO"
Dim username As String = "testuser1"
Dim password As String = "testpassword" & i
retVal = NetUserSetInfo(servername, username, 1003, password, 0)
If retVal <> 0 Then
If retVal = 2221 Then
Err.Raise(retVal, Nothing, "Unknown user '" & username & "'")
Else
Err.Raise(retVal, Nothing, "NetUserSetInfo() failed with code " & retVal)
End If
End If
Catch
EventLog.WriteEntry(Err.Source, Err.Description)
End Try
Next i
msgbox(now)
End Sub
' API function declared
Declare Unicode Function NetUserSetInfo Lib "netapi32.dll" ( _
ByVal servername As String, ByVal username As String, _
ByVal level As Integer, ByRef buf As String, _
ByRef parm_err As Integer) As Integer 3 2453
> I'm changing passwords every so often with my VB.net app using the NetUserSetInfo API call. I found that it is very slow, on a 3 GHz P4 it uses 18 seconds to change 100 passwords.
I have no idea if this is by design, but if it isn't, it should be.
I want the system to be using the most difficult and complex encryption
algorithm that it possibly can when encrypting my password. For a single
person to wait two-tenths of a second for their personal password to be
stored... that's a small price to pay for security.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
I dont think its the encryption, if you do the same encryptions in a program
you can probably do thousands in just one second, something else is
happening here.My app is a dynamic password changer, that changes passwords
every so often automatically, can change passwords like very minute if it
takes 18 sec for it to alter 100 passwords. I can get write access the NT
password file either, since its always locked by the system. Anyone have any
ideas ?
-Inge
"Nick Malik [Microsoft]" <ni*******@hotmail.nospam.com> wrote in message
news:-8********************@comcast.com... I'm changing passwords every so often with my VB.net app using the NetUserSetInfo API call. I found that it is very slow, on a 3 GHz P4 it uses 18 seconds to change 100 passwords.
I have no idea if this is by design, but if it isn't, it should be.
I want the system to be using the most difficult and complex encryption algorithm that it possibly can when encrypting my password. For a single person to wait two-tenths of a second for their personal password to be stored... that's a small price to pay for security.
-- --- Nick Malik [Microsoft] MCSD, CFPS, Certified Scrummaster http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not representative of my employer. I do not answer questions on behalf of my employer. I'm just a programmer helping programmers. --
A password reset is quite involving, what makes you thing 200 msec. per
password is slow? This is something you don't do 100 times in succession I
suppose.
Willy.
<in************@booleansoft.com> wrote in message
news:Jb*****************@fe26.usenetserver.com... I'm changing passwords every so often with my VB.net app using the NetUserSetInfo API call. I found that it is very slow, on a 3 GHz P4 it uses 18 seconds to change 100 passwords. Anyone else have the same experience ? I know for a fact that the code works. My VB.net code is as follows: Public Sub ChangePasswords() msgbox(now) Dim i As Integer For i = 0 To 100 Try Dim retVal As Long Dim servername As String = "WINXPPRO" Dim username As String = "testuser1" Dim password As String = "testpassword" & i retVal = NetUserSetInfo(servername, username, 1003, password, 0) If retVal <> 0 Then If retVal = 2221 Then Err.Raise(retVal, Nothing, "Unknown user '" & username & "'") Else Err.Raise(retVal, Nothing, "NetUserSetInfo() failed with code " & retVal) End If End If Catch EventLog.WriteEntry(Err.Source, Err.Description) End Try
Next i msgbox(now) End Sub
' API function declared Declare Unicode Function NetUserSetInfo Lib "netapi32.dll" ( _ ByVal servername As String, ByVal username As String, _ ByVal level As Integer, ByRef buf As String, _ ByRef parm_err As Integer) As Integer This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: iviskic |
last post by:
Hi,
I'm doing an analysis of program code performance when written in python
as oppose to other programming languages, and can't seem to figure out why
is the call of functions so slow?
Is a...
|
by: Jason Gates |
last post by:
Dear all
I have written a very complex web app for intranet use. It allows
users to search a large database and then returns formatted results. I
am currently employing a method as below:
1....
|
by: |
last post by:
I'm changing passwords every so often with my VB.net app using the NetUserSetInfo API call.
I found that it is very slow, on a 3 GHz P4 it uses 18 seconds to change 100 passwords. Anyone
else have...
|
by: Jonathan King |
last post by:
I have a web service, that until recently ran very quickly every time it
was called, first call included. Now, the first time it is called, it is
very slow and subsequent calls are normal. The...
|
by: floppyzedolfin |
last post by:
Hello.
I'm working in Visual Studio, language is C#, and I am coding a
cryptography program.
At some point, I need random values, and rather than using a made-
for-
it random generator, I use...
|
by: An2 |
last post by:
I have created vb.net dll which sends emails using SmtpMail.Send method.
I am using the same dll in two exe projects lets call them projSlow and projfast. For projSlow - the first call to ...
|
by: bfoo75 |
last post by:
Hi there, I'm new to this forum, but I've come here quite a bit to find solutions to problems other people have encountered... I'm currently trying to query a database up to 5000 times as fast as...
|
by: Lennart |
last post by:
Here is a problem I would like some opinions on. I have a stored
procedure (I suspect that the problem exists for other procedures as
well, but I haven't verified it). First time it runs (each day)...
|
by: =?Utf-8?B?SmltIE93ZW4=?= |
last post by:
Hi John,
Hopefully this post will find its way back to you - or perhaps be answered
by someone else. As I mentioned in my last post on the earlier portion of
this thread, changing the...
|
by: Eps |
last post by:
Hi there,
I am doing the following, this is a List of audio files.
this.Where(p =p.Album == AnAudioFileObject.Album).Select(s =>
s.Artist).Distinct().Count() 1;
The aim is to determine...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |