Command line REGEDIT for any platform

Aaron D. Brooks abrooks at css.tayloru.edu
Fri Jan 28 22:14:54 GMT 2000


> > code in particular) to read the SAM or any hive file for that matter I
> > have a project that I have been sitting on for about 6 months which reads
> > raw hive files and can dump any info you'd want. It is currently wired to
> > dump out to a REGEDIT4 format. Let me know if this is good or helpful or
> > useful.
> 
> really???

REALLY. The WinNT 4.0 registry is one of the most singularly pathetic and
backwards files I have ever come across. But hey, that's par for the
course.

The code currently reads the registry file 100%. I started this in May of
99 and was gearing up to release this after I figured some core redesigns
out. Unfortunately, as you may understand, I got horribly swamped and
haven't touched it since a week and a half after I started. I'm going to
start it as a SourceForge (www.sourceforge.net) project this next week.

There are some real problems with MS's methods of creating and
manipulating the file which leads to corruption, bloating, and general
performance degradation. I am currently reading the file the way that they
do. The file is a large raw C data structure dumped from memory with a 4k
useless header slapped on the front end. All they do is fopen() and point
to it (after a couple of useless checks).

> hmmm...
> 
> i don't think it's useful here, but i do...  *click*  it takes registry
> hives?  do you have writing-side code as well?   have you seen nico's
> "dosreg" code?

Writing will be fairly trivial, I've already changed the file
semi-manually (with the program) with no problem. My appologies to the
OpenSource community and the world at large for not being able to get this
out sooner. Mea Culpa.

nico's "dosreg" code??? Tell me more!

> does it do security descriptors as well?

Yes and no. Security descripters are kept at the head of the hive in a
doubly linked list. I haven't taken the time to look at their contents yet
but I can reassign all of the default or any created security descriptors
to any keys.

> if so, your code could be used to write a registry implementation.

I plan on writing a command line REGEDIT.EXE equivalent for any POSIX
environment. (NT included ;) This will also be able to fix and optimize
trashed or bloated registries. (Think roaming profiles.)

> one thing i really, really, really want to be able to do is to be able to
> shut down an nt PDC, take the *original* registry files, move them to a
> samba server and just GO.
> 
> and noone notices the difference.
> 
> it also means that if your boss said, "i know it's more reliable, but you
> should have asked first, so please slow the quad-pentium box we spent ten
> grand on and half a million on nt licenses down again by installing nt on
> it, not linux", you can say "ok" instead of "errr"

I will be releasing the source on SourceForge and FreshMeat in the next
week or so. You can download it from there at that time.

-Aaron




More information about the samba-ntdom mailing list