
The Offline NT Password & Registry Editor

(c) 1997-2014 Petter Nordahl-Hagen

This file is meant for developers.

General usage is via the provided boot CD images, but
static 32 bit linux builds of the tools are also available
in the "static" zip file available on my website.

See REAMDE for general instructions and license info,
HISTORY.txt for version info.

If you want to build yourself, it should compile
with most gcc compilers. However, I am not particulary good
with types, so there may be some warnings.

Unlike earlier, crypto stuff is not compiled in by default any more,
but that only disables function to set new specific password,
which does not seem to work well on newer Windows anyway.

However, you can enable it in the Makefile, if so
you may have to install the openssl-devel package from you
linux distro to compile/link, since I need the static variant.
(change the makefile to link dynamic if you wish)
I link statically with libcrypto.a from OpenSSL.
(chntpw only, other tools does not require crypto)

Thanks to Denis Ducamp for modifying chntpw to use OpenSSL.

Thanks to Mike Doty, via Alon Bar-Lev for 64 bit build compatible patch.
 (from http://bugs.gentoo.org/show_bug.cgi?id=185411)
which I may or may not have broken again in 2013...

With all things considered, the Makefile provides the following
options that can be turned on with "make <OPTION>=1":
 FORCE32  - Force compiler to generate 32-bit code and use integer
            sizes appropriate for 32 bit.
 FORCE64  - Change library location from PREFIX/lib to PREFIX/lib64.
            Only meaningful when using an external library (e.g. OSSL).
 STATIC   - Generate static binaries. Use a small libc for that.
            (No, we aren't making static libraries yet.)
 DOCRYPTO - Put the crypto stuff back in?
            Use "1_GCRPT" for grcypto.

In addition, you can set CFLAGS_MOREDEFS to toggle those highly
dangerous, outdated features:
 -DSYSKEY - Allow disabling syskey. On by default.
 -DSYSKEY_SHOW - Show syskey in menu. On by default.
 -DLSADATA - Look at LsaData. On by default.
 -DLSADATA_WRITE - Write to LsaData. Off by default.
Previously only the equivalent of -DSYSKEY was enabled.

If make goes well, you should have:
 chntpw - interactive password tool. May use crypto.
 reged - Registry edit tool, dynamic linked with libc.
 sampasswd - user list and password reset commandline util
 samusrgrp - group list and group membership tool
 cpnt - Simple copy utility, does not truncate file on write
        Now deprecated, was at least needed earlier for NTFS writes.
 libsam.so - reusable shared library that includes
             libsam and ntreg routines

libsam is currently integrated into those binaries.
You can use "make install" to install them.
For static enthusiasts, "make libsam.a" is available.

Also, the floppies and CDs are build under a different
environment for small libc size (uClibc), see website
for details. (build scripts not currently available..)

Good luck.
