Tool to test a user account and password (test login)
Solution 1:
runas /u:yourdomain\a_test_user notepad.exe
The utility will prompt for the password, if the right password has been provided, notepad will launch, if not it will produce error 1326: the username or password is incorrect
Solution 2:
Powershell script:
#usage: Test-UserCredential -username UserNameToTest -password (Read-Host)
Function Test-UserCredential {
Param($username, $password)
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
$ct = [System.DirectoryServices.AccountManagement.ContextType]::Machine, $env:computername
$opt = [System.DirectoryServices.AccountManagement.ContextOptions]::SimpleBind
$pc = New-Object System.DirectoryServices.AccountManagement.PrincipalContext -ArgumentList $ct
$Result = $pc.ValidateCredentials($username, $password).ToString()
$Result
}
http://powershellcommunity.org/Forums/tabid/54/aft/8034/Default.aspx
Solution 3:
You can also use:
net use \\computername\sharename [password] /USER:]username]
If there's a share by that name on the remote computer. Or, use C$
if the account is an admin.