Page 1 of 1 1
Topic Options
#13658 - 2001-10-29 10:03 AM Change password
Anonymous
Unregistered


I want users to change their password if it's older than 90 days. I can't do this via Usermanager, because users can't login via RAS if the option "User must change password on next login" is enabled, they won't get a window prompting for this. But because their password is expired at that moment, they can't login.

My thoughts about this are: If the password is older than 90 days (@PWAGE > 90) AND @RAS = 0 --> change password. But how can I popup the Change password window? I use Win2k.

Martijn

Top
#13659 - 2001-10-29 05:14 PM Re: Change password
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
MartijnL,
You're on the right track with @PWAGE but should also utilize @MAXPWAGE.

Unfortunately, on NT/2K, you need to do CTL-ALT-DEL (not do-able in KiX) to bring up the Change Password dialog. I don't know of an API that you can call to bring up the same dialog.

The best I can suggest is a nag screen warning them that if ignored, there are no second chances.

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#13660 - 2001-11-01 06:34 AM Re: Change password
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
MartijnL,
If you want a utility that well let your users change their passwords without the GUI, check out Bryce's site.
http://kix.isorg.net/kix_tools/
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#13661 - 2001-11-01 09:52 AM Re: Change password
Anonymous
Unregistered


Les,

I downloaded the tool already, and it's doing what I want. THe problem is that you can see what password someone is typing. So what I'm trying to do is to write a little VB-app with 3 textfields: One for the old pwd and 2 for the new pwd. If the old pwd is correct and the last two are identical, the strings are parsed to the Kix-script and then the pwd is chenged. But I'm not yet ready with it. If so, I'll post it.

Another way to do this is to write a VB-app that writes the strings into the Registry and then read it out with Kix. After the password has changed, the values are deleted.
It's a little tricky this way because it's readable for everyone in the Registry, but that seems the easiest solution.

Martijn

Top
#13662 - 2001-11-01 03:03 PM Re: Change password
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Martijn,

If your going the extra mile to write a custom VB application for this, might I suggest you "map" the NetUserChangePassword API within your VB program and simply call it from there ... that way you can check PWAGE from within your script ... then call your VB app to change the password and be done with it. Then there will be no need to pass info through the registry back to your script - then to a command-line util ...

See the changepass.zip sourcecode for API specifics ...

-Shawn

Top
#13663 - 2001-11-01 03:54 PM Re: Change password
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
MartijnL,
I strongly urge you to follow Shawn's suggestion to use the API as it will not transmit the password over the wire in clear text. Your approach would, leaving a large security hole.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#13664 - 2001-11-01 03:57 PM Re: Change password
Anonymous
Unregistered


Les, Shawn,

My opinion too. I didn't knew that this API exists, but this is the way I want it.

Thanks for the tips!

Martijn

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 4873 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.058 seconds in which 0.03 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