--- /dev/null
+--- chntpw-0.99.1-030126.orig/chntpw.c
++++ chntpw-0.99.1-030126/chntpw.c
+@@ -105,7 +105,7 @@
+
+ void str_to_key(unsigned char *str,unsigned char *key)
+ {
+- void des_set_odd_parity(des_cblock *);
++ /* void des_set_odd_parity(des_cblock *); */
+ int i;
+
+ key[0] = str[0]>>1;
+--- chntpw-0.99.1-030126.orig/Makefile
++++ chntpw-0.99.1-030126/Makefile
+@@ -12,22 +12,26 @@
+ OSSLINC=$(OSSLPATH)/include
+
+ CC=gcc
+-CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall
++CFLAGS += -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall
++# This is needed since chntpasswd uses the old des_XX functions
++CFLAGS += -DOPENSSL_DES_LIBDES_COMPATIBILITY
+
+ # This is to link with whatever we have, SSL crypto lib we put in static
+ #LIBS=-L$(OSSLLIB) $(OSSLLIB)/libcrypto.a
++LIBS=-L$(OSSLLIB) -lcrypto
+
+ # ** This is for linking with older and more lean libc than installed as default
+ # in RH7+ or newer Mandrakes. And probably others. GLIBC has BLOATED!
+ # Use the reloc (and force it) in rpm to install into /usr/local :)
+
+-LIBS=-L$(OSSLLIB) -L/usr/local/lib -L/usr/local/usr/lib \
+-$(OSSLLIB)/libcrypto.a /usr/local/usr/lib/crt1.o /usr/local/usr/lib/crti.o \
+-/usr/local/lib/ld-2.0.5.so \
+-/usr/local/usr/lib/libc.so /usr/local/lib/libc-2.0.5.so /usr/local/usr/lib/crtn.o
++#LIBS=-L$(OSSLLIB) -L/usr/local/lib -L/usr/local/usr/lib
++#$(OSSLLIB)/libcrypto.a /usr/local/usr/lib/crt1.o /usr/local/usr/lib/crti.o \
++#/usr/local/lib/ld-2.0.5.so \
++#/usr/local/usr/lib/libc.so /usr/local/lib/libc-2.0.5.so /usr/local/usr/lib/crtn.o
+
+ chntpw: chntpw.o ntreg.o
+- $(CC) $(CFLAGS) -nostdlib -o chntpw chntpw.o ntreg.o $(LIBS)
++# $(CC) $(CFLAGS) -nostdlib -o chntpw chntpw.o ntreg.o $(LIBS)
++ $(CC) $(CFLAGS) -o chntpw chntpw.o ntreg.o $(LIBS)
+
+ #ts: ts.o ntreg.o
+ # $(CC) $(CFLAGS) -nostdlib -o ts ts.o ntreg.o $(LIBS)
+--- chntpw-0.99.1-030126.orig/chntpw.8
++++ chntpw-0.99.1-030126/chntpw.8
+@@ -0,0 +1,96 @@
++.\" Hey, EMACS: -*- nroff -*-
++.\" First parameter, NAME, should be all caps
++.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
++.\" other parameters are allowed: see man(7), man(1)
++.TH CHNTPW 8 "30th May 2002"
++.\" Please adjust this date whenever revising the manpage.
++.\"
++.\" Some roff macros, for reference:
++.\" .nh disable hyphenation
++.\" .hy enable hyphenation
++.\" .ad l left justify
++.\" .ad b justify to both left and right margins
++.\" .nf disable filling
++.\" .fi enable filling
++.\" .br insert line break
++.\" .sp <n> insert n+1 empty lines
++.\" for manpage-specific macros, see man(7)
++.SH NAME
++chntpw \- utility to overwrite Windows NT/2000 SAM passwords
++.SH SYNOPSIS
++.B chntpw
++.RI [ options ]
++.RI < samfile >
++.RI [ systemfile ]
++.RI [ securityfile ]
++.RI [ otherreghive ]
++.RI [...]
++.br
++.SH DESCRIPTION
++This manual page documents briefly the
++.B chntpw
++command.
++This manual page was written for the Debian distribution
++because the original program does not have a manual page.
++.PP
++.B chntpw
++is a utility to view some information and change user passwords
++in a Windows NT/2000 SAM userdatabase file. It is not necessary to
++know the old passwords to reset them. In addition it contains a
++simple registry editor (same size data writes)
++and hex-editor with which the information contained in a registry
++file can be browsed and modified.
++.SH OPTIONS
++.TP
++.B \-h
++Show summary of options.
++.TP
++.B \-u username
++Username to change. Default is Administrator
++.TP
++.B \-l
++List all users in the SAM database.
++.TP
++.B \-i
++Interactive: list all users (as per -l) and then ask for the
++user to change.
++.TP
++.B \-e
++Registry editor with limited capabilities.
++.TP
++.B \-d
++Use buffer debugger.
++.TP
++.B \-t
++Show hexdumps of structs/segments (deprecated debug function).
++.SH EXAMPLES
++.TP
++.B chntpw sam system
++Opens registry hives
++.B sam
++and
++.B system
++and change administrator account. This will work even if the name
++has been changed or it has been localized (since different language
++versions of NT use different administrator names).
++.TP
++.B chntpw -u jabbathehutt mysam
++Prompts for password for
++.B jabbathehutt
++and changes it in the
++.B mysam
++registry file, if found (otherwise do nothing)
++.SH SEE ALSO
++If you are looking for an automated procedure for password
++recovery, you might look at the bootdisks provided by the
++upstream author at
++.BR http://home.eunet.no/~pnordahl/ntpasswd/
++.br
++There is more information on how this program works available at
++.IR /usr/share/doc/chntpw
++. This information includes in-depth information on how the
++registry works, what are syskeys and some other issues.
++.SH AUTHOR
++This manual page was written by
++Javier Fernandez-Sanguino Peña <jfs@computer.org>,
++for the Debian GNU/Linux system (but may be used by others).