1 --- chntpw-0.99.1-030126.orig/chntpw.c
2 +++ chntpw-0.99.1-030126/chntpw.c
5 void str_to_key(unsigned char *str,unsigned char *key)
7 - void des_set_odd_parity(des_cblock *);
8 + /* void des_set_odd_parity(des_cblock *); */
12 --- chntpw-0.99.1-030126.orig/Makefile
13 +++ chntpw-0.99.1-030126/Makefile
15 OSSLINC=$(OSSLPATH)/include
18 -CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall
19 +CFLAGS += -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall
20 +# This is needed since chntpasswd uses the old des_XX functions
21 +CFLAGS += -DOPENSSL_DES_LIBDES_COMPATIBILITY
23 # This is to link with whatever we have, SSL crypto lib we put in static
24 #LIBS=-L$(OSSLLIB) $(OSSLLIB)/libcrypto.a
25 +LIBS=-L$(OSSLLIB) -lcrypto
27 # ** This is for linking with older and more lean libc than installed as default
28 # in RH7+ or newer Mandrakes. And probably others. GLIBC has BLOATED!
29 # Use the reloc (and force it) in rpm to install into /usr/local :)
31 -LIBS=-L$(OSSLLIB) -L/usr/local/lib -L/usr/local/usr/lib \
32 -$(OSSLLIB)/libcrypto.a /usr/local/usr/lib/crt1.o /usr/local/usr/lib/crti.o \
33 -/usr/local/lib/ld-2.0.5.so \
34 -/usr/local/usr/lib/libc.so /usr/local/lib/libc-2.0.5.so /usr/local/usr/lib/crtn.o
35 +#LIBS=-L$(OSSLLIB) -L/usr/local/lib -L/usr/local/usr/lib
36 +#$(OSSLLIB)/libcrypto.a /usr/local/usr/lib/crt1.o /usr/local/usr/lib/crti.o \
37 +#/usr/local/lib/ld-2.0.5.so \
38 +#/usr/local/usr/lib/libc.so /usr/local/lib/libc-2.0.5.so /usr/local/usr/lib/crtn.o
40 chntpw: chntpw.o ntreg.o
41 - $(CC) $(CFLAGS) -nostdlib -o chntpw chntpw.o ntreg.o $(LIBS)
42 +# $(CC) $(CFLAGS) -nostdlib -o chntpw chntpw.o ntreg.o $(LIBS)
43 + $(CC) $(CFLAGS) -o chntpw chntpw.o ntreg.o $(LIBS)
46 # $(CC) $(CFLAGS) -nostdlib -o ts ts.o ntreg.o $(LIBS)
47 --- chntpw-0.99.1-030126.orig/chntpw.8
48 +++ chntpw-0.99.1-030126/chntpw.8
50 +.\" Hey, EMACS: -*- nroff -*-
51 +.\" First parameter, NAME, should be all caps
52 +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
53 +.\" other parameters are allowed: see man(7), man(1)
54 +.TH CHNTPW 8 "30th May 2002"
55 +.\" Please adjust this date whenever revising the manpage.
57 +.\" Some roff macros, for reference:
58 +.\" .nh disable hyphenation
59 +.\" .hy enable hyphenation
60 +.\" .ad l left justify
61 +.\" .ad b justify to both left and right margins
62 +.\" .nf disable filling
63 +.\" .fi enable filling
64 +.\" .br insert line break
65 +.\" .sp <n> insert n+1 empty lines
66 +.\" for manpage-specific macros, see man(7)
68 +chntpw \- utility to overwrite Windows NT/2000 SAM passwords
79 +This manual page documents briefly the
82 +This manual page was written for the Debian distribution
83 +because the original program does not have a manual page.
86 +is a utility to view some information and change user passwords
87 +in a Windows NT/2000 SAM userdatabase file. It is not necessary to
88 +know the old passwords to reset them. In addition it contains a
89 +simple registry editor (same size data writes)
90 +and hex-editor with which the information contained in a registry
91 +file can be browsed and modified.
95 +Show summary of options.
98 +Username to change. Default is Administrator
101 +List all users in the SAM database.
104 +Interactive: list all users (as per -l) and then ask for the
108 +Registry editor with limited capabilities.
111 +Use buffer debugger.
114 +Show hexdumps of structs/segments (deprecated debug function).
117 +.B chntpw sam system
118 +Opens registry hives
122 +and change administrator account. This will work even if the name
123 +has been changed or it has been localized (since different language
124 +versions of NT use different administrator names).
126 +.B chntpw -u jabbathehutt mysam
127 +Prompts for password for
129 +and changes it in the
131 +registry file, if found (otherwise do nothing)
133 +If you are looking for an automated procedure for password
134 +recovery, you might look at the bootdisks provided by the
136 +.BR http://home.eunet.no/~pnordahl/ntpasswd/
138 +There is more information on how this program works available at
139 +.IR /usr/share/doc/chntpw
140 +. This information includes in-depth information on how the
141 +registry works, what are syskeys and some other issues.
143 +This manual page was written by
144 +Javier Fernandez-Sanguino Peña <jfs@computer.org>,
145 +for the Debian GNU/Linux system (but may be used by others).