Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need NT Administration Examples
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00561854
Message ID:
00561966
Vues:
27
If you create a user as in the example the user does not have to change the password in the next login. Other properties have constant settings available at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/ad/managing_users.asp?frame=true
Other user info can be set like so:
oUser.FullName = "J. Crescencio Flores"
oUser.Description = "Crescencio at applications support"
HTH

>Thanks for the code and the help. A few questions to make this complete. How do I set the users Fullname, Organization, options such as not having to change password at next login and password never expires?
>
>>
>>You can do this with the help of ADSI. The examples below should give you a start:
>>
*-- Adds a user
>>oDomain = GetObject("WinNT://myServer")
>>oUser = oDomain.Create("user", "Crescencio")
>>oUser.SetInfo
>>oUser.SetPassword("mypassword")
>>oUser.SetInfo
>>*-- Adds the user to the group
>>oGroup = oDomain.GetObject("Group", "Power Users")
>>oGroup.Add("WinNT://myServer/Crescencio")
>>HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform