Re: Changing windows passwords remotely



I think that the techniques to do this will not neccesarily have anything to
do with C# language.

Try asking over in windowsxp.security. This sounds more like that sort of
issue.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





<dlinetsky@xxxxxxxxx> wrote in message
news:1124218412.519223.235750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I don't want you to write any code for me, I just want a suggestion
> about how to proceed or a web resource that dicusses the subject. I'm
> not using sql server to store credentials, I'm using windows integrated
> authentication so I need to be able to access active directory and
> change windows acoount passwords remotely using a web form. Here is
> the code from my login page to give you an idea of what I'm doing:
>
> void Login_Click(Object sender, EventArgs e)
> {
> String adPath = "LDAP://... /DC=...,DC=..."; //Path to my LDAP
> directory server
> LdapAuthentication adAuth = new LdapAuthentication(adPath);
> try
> {
> if(true == adAuth.IsAuthenticated(domain.Text, userName.Text,
> password.Text))
> {
> String groups = adAuth.GetGroups();
>
> //Create the ticket, and add the groups.
> bool isCookiePersistent = false; //chkPersist.Checked;
> FormsAuthenticationTicket authTicket = new
> FormsAuthenticationTicket(1, userName.Text,
> DateTime.Now, DateTime.Now.AddMinutes(60), isCookiePersistent,
> groups);
>
> //Encrypt the ticket.
> String encryptedTicket = FormsAuthentication.Encrypt(authTicket);
>
> //Create a cookie, and then add the encrypted ticket to the
> cookie as data.
> HttpCookie authCookie = new
> HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);
>
> if(true == isCookiePersistent)
> authCookie.Expires = authTicket.Expiration;
>
> //Add the cookie to the outgoing cookies collection.
> Response.Cookies.Add(authCookie);
>
> //You can redirect now.
>
> Response.Redirect(FormsAuthentication.GetRedirectUrl(userName.Text,
> false));
> }
> else
> {
> errorLabel.Text = "Authentication did not succeed. Check user
> name and password.";
> }
> }
> catch(Exception ex)
> {
> errorLabel.Text = "Error authenticating. " + ex.Message;
> }
> }
>


.



Relevant Pages

  • Need Help Understanding How To Add "Groups" Feature to Web Site
    ... // Now encrypt the ticket. ... // Create a cookie and add the encrypted ticket to the ... (FormsAuthentication.FormsCookieName, encryptedTicket); ... FormsAuthenticationTicket authTicket = null; ...
    (microsoft.public.dotnet.framework)
  • Re: Changing windows passwords remotely
    ... > //Create the ticket, and add the groups. ... > DateTime.Now, DateTime.Now.AddMinutes, isCookiePersistent, ... > String encryptedTicket = FormsAuthentication.Encrypt; ... > //Create a cookie, and then add the encrypted ticket to the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Changing windows passwords remotely
    ... about how to proceed or a web resource that dicusses the subject. ... //Create the ticket, and add the groups. ... String encryptedTicket = FormsAuthentication.Encrypt; ... //Create a cookie, and then add the encrypted ticket to the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Non persistent cookie timeout?
    ... > How do i get the cookie to time out after a period of inactivity, ... > If I close the browser, the next time I use the application, it makes ... > // Now encrypt the ticket. ... > string encryptedTicket = FormsAuthentication.Encrypt; ...
    (microsoft.public.dotnet.framework.aspnet)
  • problem with 2003 krb and mit krb integration with mozilla thunderbirdon a multiple realm scenario
    ... I'm trying to log in on cyrus imap running on a Linux box, ... from a Windows XP Pro workstation logged on a Windows 2003 DC using a ... Log on Windows 2003 DC using my MIT Kerberos. ... On the 1st and 2nd tests I got a TGS ticket ...
    (comp.protocols.kerberos)