Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Cambiare password dominio

    Ciao a tutti. C'è un modo per cambiare la password di dominio da un'applicazione web?
    Grazie.

  2. #2
    Dovresti approfondire l'uso delle varie classi che trovi nel namespace
    System.DirectoryServices
    http://msdn2.microsoft.com/en-us/lib...yservices.aspx

    Ti copio e incollo un esempio

    string adspath = "LDAP://SYST.ctc.edu/CN="+username+",OU=Users,OU=Seattle District (060 - SCCD),OU=Washington Colleges,DC=SYST,DC=ctc,DC=edu";
    DirectoryEntry entry1 = new DirectoryEntry (adspath, @"domain\username", "PWD", AuthenticationTypes.Secure);
    string OldPassword = "OLDPWD";
    string NewPassword = "mynewsecre@t!#*";
    object[] tt = new object[]{OldPassword, NewPassword};
    try
    {
    entry1.Invoke( "ChangePassword" ,tt );
    entry1.Properties["userAccountControl"].Value = 0x0200;
    entry1.CommitChanges();
    }
    catch(Exception excp)
    {
    throw(excp);
    }
    Saluti a tutti
    Riccardo

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.