-
I tried to access the SAM file which is located in the WindowsNT system directory.
The exact path is C:\WINNT\system32\config and the
filename is SAM.
When I try to access this file in any way e.g. using the
TYPE command in the command prompt, or using notepad
to read the file, I get an error message that this file
is used by another process and is not accessable.
I can't even copy it. I can only read its attributes.
The SAM file saves the passwords under WindowsNT.
I can't read the file alltough I'm the administrator.
Is there a way to gain access to SAM?
thx, vbzero
-
Naughty, naughty. As an Administrator, you should know better. You can't access it because it is locked out by kernel processes in NT itself. Access is via the control panel applets for managing passwords. Mind you, you could always close down NT and boot into DOS.... But I didn't tell you that.
Paul.
-
I know that I could boot into DOS - I'm searching for a way to get the SAM data using an application.
This should be able on any computer - not on mine.
I said that I'm the admin because I thought the program
may needs administrative rights.
thx, vbzero
-
Provided it's not a NTFS partition that is.
If you want to access user and password information you have to ask NT very nicely using the API
NetUserAdd
NetUserGetInfo
NetUserChangePassword
etc
They're a pain in the ass because you have to pass pointers to Null terminated Unicode strings. I ended up using byte arrays and passing VarPtr(Userid(1)) and stuff like that.
There is a class floating arround here for doing it but the add user function causses a GPF if it's called more than once.
I ended up chucking it and writing my own function for add user (I didn't need the others) to import lists of users into NT
-
This sounds pretty good but where can I find some code examples for that or maybe do you know where exactly the
passwords are saved?
Is it possible to decode the SAM-file?
thx, vbzero
-
I worked through it from here
http://msdn.microsoft.com/library/ps...mapi2_1944.htm
There are links on that page to most of the rest, I didn't use the sample code but the parameter defs were very helpful
provided you know C
And if you don't know C and you want to get into API programming then it's time to learn, go and by "C in Plain english" not a big or an expensive book and it's easy to read though.
-
Thank you for help. I know C allready.
thx, vbzero