]> git.pld-linux.org Git - packages/chntpw.git/blob - chntpw-debian.patch
c4af795ca3208da664f1ab91e657ce80770e4dd6
[packages/chntpw.git] / chntpw-debian.patch
1 --- chntpw-0.99.1-030126.orig/chntpw.c
2 +++ chntpw-0.99.1-030126/chntpw.c
3 @@ -105,7 +105,7 @@
4  
5  void str_to_key(unsigned char *str,unsigned char *key)
6  {
7 -       void des_set_odd_parity(des_cblock *);
8 +       /* void des_set_odd_parity(des_cblock *); */
9         int i;
10  
11         key[0] = str[0]>>1;
12 --- chntpw-0.99.1-030126.orig/Makefile
13 +++ chntpw-0.99.1-030126/Makefile
14 @@ -12,22 +12,26 @@
15  OSSLINC=$(OSSLPATH)/include
16  
17  CC=gcc
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
22  
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
26  
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 :)
30  
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 
39  
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)
44  
45  #ts: ts.o ntreg.o
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
49 @@ -0,0 +1,96 @@
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.
56 +.\"
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)
67 +.SH NAME
68 +chntpw \- utility to overwrite Windows NT/2000 SAM passwords
69 +.SH SYNOPSIS
70 +.B chntpw
71 +.RI [ options ]
72 +.RI < samfile > 
73 +.RI [ systemfile ]
74 +.RI [ securityfile ]
75 +.RI [ otherreghive ] 
76 +.RI [...]
77 +.br
78 +.SH DESCRIPTION
79 +This manual page documents briefly the
80 +.B chntpw
81 +command.
82 +This manual page was written for the Debian distribution
83 +because the original program does not have a manual page.
84 +.PP
85 +.B chntpw
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.
92 +.SH OPTIONS
93 +.TP
94 +.B \-h
95 +Show summary of options.
96 +.TP
97 +.B \-u username
98 +Username to change. Default is Administrator
99 +.TP
100 +.B \-l
101 +List all users in the SAM database.
102 +.TP
103 +.B \-i
104 +Interactive: list all users (as per -l) and then ask for the 
105 +user to change.
106 +.TP
107 +.B \-e
108 +Registry editor with limited capabilities.
109 +.TP
110 +.B \-d
111 +Use buffer debugger.
112 +.TP
113 +.B \-t
114 +Show hexdumps of structs/segments (deprecated debug function).
115 +.SH EXAMPLES
116 +.TP
117 +.B chntpw sam system
118 +Opens registry hives 
119 +.B sam 
120 +and 
121 +.B system
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).
125 +.TP
126 +.B chntpw -u jabbathehutt mysam
127 +Prompts for password for 
128 +.B jabbathehutt
129 +and changes it in the 
130 +.B mysam
131 +registry file, if found (otherwise do nothing)
132 +.SH SEE ALSO
133 +If you are looking for an automated procedure for password 
134 +recovery, you might look at the bootdisks provided by the
135 +upstream author at
136 +.BR http://home.eunet.no/~pnordahl/ntpasswd/
137 +.br
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.
142 +.SH AUTHOR
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).
This page took 0.087974 seconds and 3 git commands to generate.