Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Verify domain credentials at command line

Is there a windows command that will allow me to verify a domain account/password?

like image 979
jing Avatar asked Mar 21 '11 14:03

jing


People also ask

How do I check domain credentials?

Go to lookup.icann.org. In the search field, enter your domain name and click Lookup. In the results page, scroll down to Registrar Information. The registrar is usually your domain host.

How do I authenticate using CMD?

You could use the net use command, specifying the username and password on the command-line (in the form net use \\unc\path /user:username password and check the errorlevel returned to verify if a credential is valid.

How do I open credential manager from CMD?

cmdkey.exe allows to access the Credential Manager from the command line ( cmd.exe , PowerShell). The Credential Manager can be opened from the Control Panel -> User Accounts -> Credential Manager. Credentials can be backed up or restored from a Credential Backup File ( . crd ) with credwiz.exe .


1 Answers

You could use the command RUNAS, it is not technically a commandline to validate credentials, but it CAN be used for that.

runas /noprofile /user:mycomputer\administrator "notepad"

If it fails it returns:

RUNAS ERROR: Unable to run - notepad
1326: Logon failure: unknown user name or bad password.
like image 90
Jack B Nimble Avatar answered Sep 28 '22 08:09

Jack B Nimble