I am unable to get User Name And Password from SAM file.Can Any One have Experience that how to get the password from SAM file.

Thanks ALOT!

Votes + Comments
7 Years
Discussion Span
Last Post by onlinessp

The SAM file contains the user name and a hash of the password; not the actual password.
This is a protected system file and not even an Administrator user has access while the computer is running.
That said, there is stuff about this on the internet; just Google "SAM file".


The purpose of a password is security.
If you could find out what it was easily then it would not be very secure.
I know of no honourable reason why you would want to read someone else’s password.
Perhaps you should re-think what you want to do.

Votes + Comments

I am making security descriptive for windows for which it take admin password from user .I have to match it that this password is original or not for this purpose i need original password.
thanks on your post


If that is the case then you are approaching this the wrong way.
Your question should have been "How can I check a user's Windows password?".
Look at the System.Security and System.Security.Principal namespaces.
Also, the System.Threading.Thread.CurrentPrincipal.IsInRole method may also be useful.

This link may also help:http://msdn.microsoft.com/en-us/library/system.security.principal.windowsimpersonationcontext.aspx

Edited by nick.crane: Added link to WindowsImpersonationContext

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.