?
Solved

Get Domain Password Complexities

Posted on 2010-01-11
7
Medium Priority
?
807 Views
Last Modified: 2013-12-04
I'm trying to create a Mini App that will reset the User's Password to 1 of 3 options,
1. Default Password
2. Randomly Generated Password (Possible Alpha Numeric with symbols)
3. Simple Password that has the Person's name with some random digit replacements (so random number of 01 gets - MyNam301)

I cant find anything to check what the current domain settings are (Password length ect.)

Also, how would i go about replacing the Password?
0
Comment
Question by:bromy2004
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 13

Accepted Solution

by:
game-master earned 2000 total points
ID: 26290654


good afternoon!
try something like this..

i hope i can give u some idea..



game-master
Sub changePassword(strComputer As String)

        'do something with strComputer
        If TestPing(strComputer) Then
        
            On Error Resume Next
            Dim objAdmin
            Set objAdmin = GetObject("WinNT:\\" & strComputer & "\Administrator,user")
            
            If Err = 0 Then
                objAdmin.SetPassword "P@ssw0rd!"
                objAdmin.SetInfo
            Else
                Debug.Print "Error Found"
            End If
            
        End If
        
End Sub

Function TestPing(sName)
    Dim cPingResults, oPingResult
    Set cPingResults = GetObject("winmgmts://./root/cimv2").ExecQuery("SELECT * FROM Win32_PingStatus WHERE Address = '" & sName & "'")
    For Each oPingResult In cPingResults
        If oPingResult.StatusCode = 0 Then
            TestPing = True
        Else
            TestPing = False
        End If
    Next
End Function

Open in new window

0
 
LVL 10

Author Comment

by:bromy2004
ID: 26290685
Was that designed for VB .NET?
because the "Err" had an error,
Changed it to Err.Number

It still had an error in VB.NET and Excel VBA
Automation Error

at:
objAdmin = GetObject("WinNT:\\" & strComputer & "\Administrator,user")

I dont really understand what either "GetObject" does.
0
 
LVL 13

Expert Comment

by:game-master
ID: 26290976

if Err.Number = 0 i should say..

it's for vb6..


game-master
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 10

Author Comment

by:bromy2004
ID: 26291248
Would it work in VB.NET?
0
 
LVL 10

Author Comment

by:bromy2004
ID: 26337946
Any progress?
0
 
LVL 13

Expert Comment

by:game-master
ID: 26339061


good afternoon!

yes it will to vb.net
0
 
LVL 13

Expert Comment

by:game-master
ID: 26377309


good morning!


im glad i could help you...


thanks for the points.. :-)


game-master
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month8 days, 12 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question