Re: Changing windows passwords remotely
- From: "Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 16 Aug 2005 21:29:31 +0200
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;
> }
> }
>
.
- References:
- Changing windows passwords remotely
- From: dlinetsky@xxxxxxxxx
- Re: Changing windows passwords remotely
- From: Amir Ghezelbash
- Re: Changing windows passwords remotely
- From: dlinetsky@xxxxxxxxx
- Changing windows passwords remotely
- Prev by Date: Assembly not found: u_pawew4.dll
- Next by Date: Re: Passing Objects and protection level
- Previous by thread: Re: Changing windows passwords remotely
- Next by thread: Re: Changing windows passwords remotely
- Index(es):
Relevant Pages
|