IIS and SMTP - user password management

This is Interesting: Free IT Magazines  
Home > Archive > IIS and SMTP > June 2004 > user password management





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author user password management
Dodo

2004-06-28, 8:55 am

anyone have any ides for members of the pop3 users group being able to
change their own passwords?


Ralf Ziller

2004-06-28, 8:55 am

"Dodo" <dodo@no.fly> schrieb im Newsbeitrag
news:eAj41gPXEHA.3168@TK2MSFTNGP10.phx.gbl...
> anyone have any ides for members of the pop3 users group being able to
> change their own passwords?


There is no mechanism implemented for this in the POP3 protocol. You could
create a Asp(x) page that can do this.
Here's some code in c# you could use inside an aspx:

// get the DirectoryEntry for the User
DirectoryEntry entry = new DirectoryEntry(@"WinNT://<domain>/"+UserName);

//Passwords are passed in an Array containing the old and new password

object[] oPassword = new object[2];

// fill Array with Passwords obtained from Textboxes.

oPassword[0] = oldPass.Text;

oPassword[1] = newPass1.Text;

try

{

// Invoke the ChangePassword function for the user

entry.Invoke("ChangePassword", oPassword);

}

catch (System.Reflection.TargetInvocationException TIE)

{

System.Runtime.InteropServices.COMException ce =

(System.Runtime.InteropServices.COMException) TIE.InnerException;

if(ce.ErrorCode==-2147024810)

{// old Password does not match; inform the user...}

else

{

// other error... throw it up the stack

throw(ce);

}

}

finally

{

// close the DirectoryEntry

entry.Close();

}


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com