|
-
Nov 8th, 2000, 05:16 PM
#1
Thread Starter
Hyperactive Member
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
-
Nov 8th, 2000, 07:38 PM
#2
Fanatic Member
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.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 9th, 2000, 01:44 AM
#3
Thread Starter
Hyperactive Member
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
-
Nov 9th, 2000, 02:25 AM
#4
Fanatic Member
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
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
Nov 9th, 2000, 06:52 AM
#5
Thread Starter
Hyperactive Member
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
-
Nov 9th, 2000, 08:23 AM
#6
Fanatic Member
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.
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
Nov 9th, 2000, 12:11 PM
#7
Thread Starter
Hyperactive Member
Thank you for help. I know C allready.
thx, vbzero
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|