ADSI User management

ADSI User management

Post by Peter V » Thu, 26 Oct 2000 04:00:00



Hi,

How can I
1. do my own user/password authentication using adsi ?
2. set that a user has to change his password on next logon

I'm using VB6 & ADSI 2.5

Thanks

Peter


 
 
 

ADSI User management

Post by Marc Scheune » Thu, 26 Oct 2000 04:00:00




Quote:>2. set that a user has to change his password on next logon

Set the "pwdLastSet" property to 0.

Here's how I do it in Delphi - translating it to VB shouldn't be too
difficult:

var
  oTemp : IUnknown;
  oUser : IADsUser;
  oContainer : IADsContainer;
  varZero    : OleVariant;  
begin
   ..... setting up user creation........
   oTemp := oContainer.Create('user', aName);
   oUser := oTemp as IADsUser;
   ................
  varZero := 0;
  oUser.Put('pwdLastSet', varZero);
end;

Marc