Debian Codegraph @

debian/patches/11_improve_documentation

raw
1
2 Description: Fix spelling and grammar mistakes in documentation
3 Author: Javier Fernandez-Sanguino <[email protected]>
4 Forwarded: NOT yet
5 Last-Update: 2014-08-07
6 Copyright: This file is distributed with the same license as the chntpwd sources
7
8 This patch is the result of reviewing (by a non-foreign speaker, oh! the
9 irony!) the documentation provided by the upstream author in
10 the sources (text files).
11
12 It tries to fix some grammar and spelling mistake, while trying not
13 to add any new ones.
14
15
16 --- a/MANUAL.txt
17 +++ b/MANUAL.txt
18 @@ -15,14 +15,14 @@
19 SOFTWARE - HKEY_LOCAL_MACHINE\SOFTARE: Config and info of installed
20 software and a lot of higher level windows config
21
22 -Note that these programs (and the registry library they use) does not
23 -join all these files in the same tree like windows does.
24 +Note that these programs (and the registry library they use) do not
25 +join all these files in the same tree like Windows does.
26 For example, a path like
27 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control
28 is not valid, it is instead just
29 ControSet001\Control
30 (after selecting the hive if more than one is loaded)
31 -But except if you use the registry edit or export/import functions you
32 +But, unless you use the registry edit or export/import functions, you
33 do not need think about this as for other things the tools handle
34 this.
35
36 @@ -49,65 +49,65 @@
37
38
39
40 - -u <user> Username or RID (0x3e9 for example) to interactively edit
41 + -u <user> Username or RID (0x3e9 for example) to edit interactively
42
43 -Invoke the interactive edit menu on specified user.
44 -Specifying a user name will most likely fail if user has international
45 -character, so better to use user ID (RID), for example
46 +Invoke the interactive edit menu on the specified user.
47 +Specifying a user name will most likely fail if the username has international
48 +characters, so itis better to use the user's ID (RID), for example
49 chnptw -u 0x3e9 SAM
50 -to edit user with hexadecimal RID 3e9
51 +to edit the user with hexadecimal RID 3e9
52
53
54 - -l list all users in SAM file and exit
55 + -l list all users in the SAM file and exit
56
57 -Just that, list users in human readable form, with some info about if
58 -user is admin and if password is set.
59 +Just that, list all the users in human readable form, with some information
60 +about the user, such as if the user is an administrator user and if the password is set.
61
62 -i Interactive Menu system
63
64 Invokes the menu system. Menu items will vary a bit depending on what
65 registry hives are loaded.
66
67 - -f Interactively edit first admin user
68 + -f Interactively edit the first admin user
69
70 -Select first admin user for edit. This is user with lowest RID that
71 -also is member of administators group, or built-in user 0x1f4 if not
72 -others possible.
73 +Select the first admin user for edit. This is the user with the lowest RID that
74 +also is member of the administrators group, or the built-in user 0x1f4 if no
75 +other users are found.
76
77 -e Registry editor. Now with full write support!
78
79 -Enter the registry editor. It is a small command system. ? for help
80 -there. See other documentation for more on regedits.
81 +Enter the registry editor. It is a small command system. Press '?' for help
82 +there. See other documentation for more information on regedits.
83
84 - -d Enter buffer debugger instead (hex editor),
85 + -d Enter the buffer debugger instead (hex editor),
86
87 -Command line type hex editor, mostly for debugging purposes. ? for help.
88 +Command line type hex editor, mostly used for debugging purposes. ? for help.
89
90 - -v Be a little more verbose (for debuging)
91 + -v Be a little more verbose (for debugging)
92
93 Lots of debug output during most operations (especially hive loading)
94
95 -L For scripts, write names of changed files to /tmp/changed
96
97 If any of the other functions changes the registry, the changed files
98 -are listed here. Can be used by wrapper scripts to know what to save.
99 +are listed here. This option can be used by wrapper scripts to know what to save.
100 My boot CD uses it.
101
102 -N No allocation mode. Only same length overwrites possible (very safe mode)
103
104 -Safe mode. Will only allow changes in registry that overwrites old
105 -values with same length data. Password reset only changes 2 bytes, and
106 -does not change value lenght, so password reset will still work in
107 +Safe mode. This option will only allow changes in the registry that overwrite old
108 +values with the same length data. Password reset only changes 2 bytes, and
109 +does not change value length, so password resets will still work in
110 this safe mode. If something tries to violate this safe mode, a lot of
111 -error messages (some of the rather obscure) may occur.
112 +error messages (some of them rather obscure) may be shown.
113
114 -E No expand mode, do not expand hive file (safe mode)
115
116 Safe mode. Does not allow expanding the size of the file, but will
117 -allow adding keys/values as long as there is free space in the file
118 +allow adding keys/values as long as there is enough free space in the file
119 already. (most files contains some free space)
120 If expansion is needed but not allowed by this option,
121 -a lot of obscure error messages may occur, and file should not be saved.
122 +a lot of obscure error messages may be show, and the file should not be saved.
123
124 -------------------------------------------------------------------------
125
126 @@ -155,10 +155,10 @@
127
128 reged -x system HKEY_LOCAL_MACHINE\\SYSTEM ControlSet001 output.reg
129
130 -should export everything below ControlSet001 key from registry hive
131 -file named system into .reg file named output.reg, using
132 +should export everything below ControlSet001 key from the registry hive
133 +file named 'system' into the .reg file named 'output.reg', using
134 HKEY_LOCAL_MACHINE\SYSTEM in front of every key name in the .reg file.
135 -(in most shells \\ is needed to ignore the meaning \ has to the shell)
136 +(in most shells \\ is needed to ignore the meaning '\' has to the shell)
137
138 reged -x system HKEY_LOCAL_MACHINE\\SYSTEM ControlSet001\\Enum output.reg
139
140 @@ -166,7 +166,7 @@
141
142 reged -x system HKEY_LOCAL_MACHINE\\SYSTEM \\ output.reg
143
144 -export everything in the system file
145 +exports everything in the system file
146
147
148
149 @@ -174,12 +174,12 @@
150 Import from .reg file. Where <prefixstring> for example is HKEY_LOCAL_MACHINE\SOFTWARE
151 Only one .reg and one hive file supported at the same time
152
153 -Reverse of -x, this reads from a .reg file and puts it into the hive
154 -file, just like regedit.exe foobar.reg will do in windows.
155 -The <prefixstring> is removed from the start of each key name, if you
156 +This option is the opposite of -x: it reads from a .reg file and puts it into the hive
157 +file, just like 'regedit.exe foobar.reg' will do in Windows.
158 +The <prefixstring> is removed from the beginning of each key name, if you
159 specify this wrong, the result may not be what you expected.
160 KNOWN PROBLEM: This routine is slow, very slow indeed on binary values (has
161 -hex numbers in .reg file). May take over 5 minutes to import a file
162 +hex numbers in .reg file). It may take over 5 minutes to import a file
163 the size of a normal XP software-hive .reg export.
164 Problems / unusual things in the .reg file may cause crash or
165 unexpected data or some times even an error messsage! :)
166 @@ -190,10 +190,10 @@
167 -e <registryhive> ...
168 Interactive edit one or more of registry files
169
170 -Enter the registry editor. It is a small command system. ? for help
171 +Enter the registry editor. This is a small command system. Press '?' for help
172 there. See other documentation for more on regedits.
173 -If both -I and -e given, editor will be entered after import, but
174 -before save, so you can check things if you need.
175 +If both -I and -e given, editor will be entered after importing, but
176 +before saving, so you can check things if you need.
177
178
179 Options:
180 @@ -292,12 +292,12 @@
181
182 samusrgrp
183 is a command line tool to add users to groups or remove users from
184 -groups. Users and groups must be local (cannot be domain / AD).
185 +groups. Users and groups must be local (i.e. they cannot be domain / AD).
186 It can also list the groups with their members in several forms, the
187 -output can be used in scripts of course.
188 +output can be used in scripts as it is provided in machine readable format.
189
190 Listing groups will also list domain users that are members of the
191 -group (if any), but it will not be able to look up the name, so it
192 +group (if any), but it will not be able to look up the name, so they
193 will be listed as a SID only.
194
195 samusrgrp version 0.2 130501, (c) Petter N Hagen
196 @@ -310,7 +310,7 @@
197 -L = list groups and also their members
198 -s = Print machine SID
199
200 -For add or remove, you must also specify a bit more info:
201 +To add or remove a user, you must also specify some more information:
202
203 Parameters:
204 <user> can be given as a username or a RID in hex with 0x in front
205 @@ -356,9 +356,9 @@
206 Members name (if available, else SID)
207 Members SID
208
209 -So in this example, the Guests group have 2 members: Administrator and
210 +So in this example, the Guests group has 2 members: Administrator and
211 Guest.
212 -At the time of writing this, it WILL NOT LIST EMPTY GROUPS (no
213 +At the time of writing this, it WILL NOT LIST EMPTY GROUPS (groups with no
214 members). I plan to change this, empty groups on one line with -1 in
215 member number field, and rest of user fields empty.
216
217 @@ -429,7 +429,7 @@
218
219 User RID (hex)
220 User name
221 -Is user admin? (1 = yes, 0 = no) (member of group ID 0x220)
222 +Is the user an administrator? (1 = yes, 0 = no) (member of group ID 0x220)
223 Account flags, ACB (hex). See sam.h file.
224 Password hash length. 14 = normal password. 0 or 4 = probably blank.
225
226 @@ -441,58 +441,61 @@
227 Reset user :01f4:Administrator
228 Reset user :03e9:pnh
229
230 -which of course is :RID:username
231 +which of course is in the format :RID:username
232
233
234 Explanation on this:
235 -r -f -> Reset password of admin user with lowest RID
236 not counting built-in admin (0x1f4) unless it is the only admin
237
238 -All windows from NT3.1 up has a system created administrator account
239 +All Windows systems, from version NT3.1 up, include a predefined administrator account
240 with RID (user ID) 0x1f4 (500 decimal)
241
242 -Before Windows XP the installer asked for a password for this account,
243 -and then it was used to login first after installation.
244 -(Built-in guest account was also created by the installer, but it has
245 +Before Windows XP, the installer asked for a password for this account,
246 +and then it was used to login right after installation.
247 +(The built-in 'Guest' account was also created by the installer, but it has
248 always been disabled by default)
249
250 -On Windows XP and newer systems, the installer also creates this
251 -account, but locks it down, it generally cannot be logged in. It is
252 -also not shown on the welcome screen (unless all other users are
253 +On Windows XP and newer Windows systems, the installer also creates this
254 +account, but it is locked down. It cannot be used to log in. It is
255 +also not shown on the 'Welcome' screen (unless all other users are
256 deleted or disabled)
257 -The installer instead asks for a user to create during install. That
258 +
259 +Instead, the installer asks for a new user to create during the installation. That
260 user is a normal non-hardwired user (RID > 0x3e8, 1000 decimal),
261 -and it is added to the built-in administrators group (group # 0x220).
262 +and it is added to the built-in Administrators' group (group # 0x220).
263
264 -It is users in the built-in group 0x220 that generally has full
265 +The users in the built-in group 0x220 ('Administrators') generally have full
266 administrator rights to the machine.
267
268 -(XP installer can create several users, but only first gets group
269 +(Note: XP installer can create several users, but only the first user gets group
270 0x220)
271
272 -More users can of course be added from the control panel, and they can
273 -be put into the 0x220 group if neccessary. From the "simplified"
274 -control panel dialog this is what happens if user is selected to be able to
275 -have full (or admin) access to the machine. If user is set to "normal"
276 -or something like that, it is not in the 0x220 group.
277 +More users can of course be added from the Control Panel, and they can
278 +be added to the 0x220 group if neccessary. From the "simplified"
279 +Control Panel dialog this is what happens if a user is selected and is configured to
280 +have full (or admin) access to the machine. If a user is set to "normal"
281 +or something like that, it will not be included in the 0x220 group.
282
283 From the "Users and Groups" part of the administrative tools (not
284 -available on some home versions of windows) the group assignments and
285 +available on some Windows Home versions) the group assignments and
286 other user info can be changed in more detail of course.
287 +
288 From there, users in a domain (if machine is in domain) can also be
289 -added to the local 0x220 group, the domain user full access to that
290 -local machine even if the user is nothing special in the domain.
291 +added to the local 0x220 group. A domain user will have full access to that
292 +local machine even if the user is not included in any Domain Administrators'
293 +group.
294
295 Anyway..
296 -On XP and newer, it is therefore not the hardwired 0x1f4 account that is
297 -used for admim. On home machines it is most often the first regular one (since
298 -most people do not change any user stuff after the installer) or it
299 -could be any other user in the list.
300 +On XP and newer Windows version, the hardwired 0x1f4 account is not used
301 +for administrative purposes. On home machines it is most often the first
302 +regular user (since most people do not change any user stuff after the
303 +installation) or it could be any other user in the list.
304
305 -So this reset function picks the first it finds over 0x3e8 (1000)
306 +So this reset function picks the first user it finds over 0x3e8 (1000)
307 that is also in the 0x220 group. It will most likely work for 98% of
308 -home user machines :) Unless there are no users in the 0x220 group,
309 -then it picks the 0x1f4 hard-wired user (since it may be Windows
310 +home user machines :) If there are no users in the 0x220 group,
311 +then it will pick the 0x1f4 hard-wired user (since the system may be Windows
312 2000??????).
313
314 This may of course be wrong if someone managed to remove all accounts
315 @@ -502,7 +505,7 @@
316
317 Explanation on -a -r:
318
319 -The -r -a option will reset all users in the 0x220 group. Also user
320 +The -r -a option will reset all users in the 0x220 group. This includes user
321 0x1f4, which maybe is bad.. will consider changing this...
322
323
324 --- a/README.txt
325 +++ b/README.txt
326 @@ -7,17 +7,17 @@
327
328 "ntreg" (the registry library) and
329 "libsam" (SAM manipulation library, user, groups etc)
330 -is licensed under the GNU Lesser Public License. See LGPL.txt.
331 +are licensed under the GNU Lesser Public License. See LGPL.txt.
332
333 "chntpw" (the password reset / registry editor frontend)
334 "reged" (registry editor, export and import tool)
335 "sampasswd" (password reset command line program)
336 "samusrgrp" (user and group command line program)
337 -is licensed under the GNU General Public License, see GPL.txt.
338 +are licensed under the GNU General Public License, see GPL.txt.
339
340
341 -For manual to the different commands, see MANUAL.txt
342 -Also, all have some help built in, just use the -h option.
343 +For a manual of the different commands, plese see MANUAL.txt
344 +Also, all programs have some built-in help, just use the -h option.
345
346 See INSTALL.txt for compile instructions.
347
348 @@ -29,16 +29,23 @@
349
350 At that site there's a floppy and a bootable CD that use chntpw to
351 access the NT/2k/XP/Vista/Win7/Win8 system it is booted on to edit password etc.
352 -The instructions below are for the standalone program itself, not the floppy.
353 +The instructions below are for the standalone program itself, not for the floppy.
354
355 What does chntpw do?
356 --------------------
357
358 This little program will enable you to view some information and
359 -change user passwords, change user/group memberships
360 -in a Windows (NT/XP/Vista/win7/win8) etc SAM userdatabase file.
361 -You do not need to know the old passwords.
362 -However, you need to get at the registry files some way or another yourself.
363 +change user's passwords, change user/group's memberships
364 +in a Windows (NT, XP, Vista, Win7, Win8, etc.) SAM userdatabase file.
365 +You do not need to know the previous passwords.
366 +However, you need to access at the registry files some way or another yourself.
367 +
368 +For example, you can run this utility from a Live CD in a Windows computer
369 +and, after booting, mount the NTFS filesystem. Or remove the hard drive
370 +from the system and install it (e.g. using a USB hard-disk case) in a
371 +Linux system where you have this tool installed.
372 +
373 +
374 In addition it contains a simple registry editor with full write support,
375 and hex-editor which enables you to
376 fiddle around with bits&bytes in the file as you wish yourself.
377 @@ -46,9 +53,9 @@
378 Also have registry import or export
379 -----------------------------------
380
381 -"reged" is a program that can do import and export of .reg files into
382 -the registry hive (binary) files. Also has an editor, but still
383 -rudimentary text based command line type thing.
384 +"reged" is a program that can import and export .reg files into
385 +the registry hive (binary) files. It also has an editor, but it is still
386 +a rudimentary text based command-line type of thing.
387
388 And by popular request
389 Even have programs that can be used in scripts!
390 @@ -65,41 +72,42 @@
391
392 I often forget passwords. Especially on test installations (that
393 I just _must_ have some stuff out of half a year later..)
394 -On most unix-based boxes you just boot the thingy off some kind
395 +On most Unix-based boxes you just boot the thingy off some kind
396 of rescue bootmedia (cd/floppy etc), and simply edit the
397 password file.
398 On Windows however, as far as I know, there is no way except reinstalling
399 the userdatabase, losing all users except admin.
400 (ok, some companies let you pay lotsa $$$$$ for some rescue service..)
401 (ok, from Windows Vista or something you can make a password reset
402 -file, but you have to remember to do that BEFORE you forget your password...)
403 +CD or USB, but you have to remember to do that BEFORE you forget your password...)
404
405 How?
406 ----
407
408 -Currently, this thing only runs under linux, but it may just happen
409 +Currently, this thing only runs under Linux, but it may just happen
410 to compile on other platforms, too.
411
412 -So, to set a new adminpassword on your Windows installation you either:
413 +So, to set a new administrator's password on your Windows installation you either:
414
415 -1) Take the harddrive and mount it on a linux-box
416 +1) Take the harddrive and mount it on a Linux box
417
418 or
419
420 -2) Boot a "live" linux CD with full GUI (many available: Ubuntu,
421 +2) Boot a "live" Linux CD with full GUI (there are many available: Ubuntu,
422 Knoppix and more. Search for them)
423
424 -In both those cases, use the "chntpw.static" program found in the
425 +In both those cases, you can use the "chntpw.static" program found in the
426 "static" zip file on my website.
427 +
428 or
429
430 -3) Use my linux boot CD (or USB) at: http://pogostick.net/~pnh/ntpasswd/
431 +3) Use my Linux boot CD (or USB) avialable at: http://pogostick.net/~pnh/ntpasswd/
432
433 Usage:
434 ------
435
436 -For manual to the different commands, see MANUAL.txt
437 -Also, all have some help built in, just use the -h option.
438 +You will find a manual to the different commands in the MANUAL.txt file.
439 +Also, all programs have some help built in, just use the -h option.
440
441 Some old tech babble on how the password is stored
442 --------------------------------------------------
443 @@ -108,21 +116,21 @@
444
445 A struct, called the V value of a key in the NT registry
446 was suddenly somewhat documented through the pwdump utility
447 -included in the unix Samba distribution.
448 +included in the Unix Samba distribution.
449 This struct contains some info on a user of the NT machine,
450 along with 2 crypted versions of the password associated
451 with the account.
452
453 One password is the NT console login password,
454 -the other the LANMAN network share password
455 +the other is the LANMAN network share password
456 (which essentially is the first one in uppercase only,
457 - and no unicode)
458 + and no Unicode)
459
460 This is how NT encrypts the passwords:
461
462 The logon cleartext password a user enters is:
463 -1) Converted to unicode
464 -2) A MD4 hash is made out of the unicode string
465 +1) Converted to Unicode
466 +2) A MD4 hash is made out of the Unicode string
467 3) Then the hash is crypted with DES, using the RID (lower
468 part of the SID, userid) as the crypt key.
469 This is the so called "obfuscation" step, so
470 @@ -134,7 +142,7 @@
471 1) Uppercased (and illegal characters probably removed)
472 14 bytes max, if less the remaining bytes are zeroed.
473 2) A known (constant) string is DES-encrypted
474 - using 7 first characters of the password as the key.
475 + using the 7 first characters of the password as the key.
476 Another constant is encrypted using the last 7 chars
477 as the key.
478 The result of these two crypts are simply appended,
479 @@ -142,13 +150,13 @@
480 3) The same obfuscation DES stage as 3 above.
481 4) 16 bytes result put into the V struct.
482
483 -Since the number of possible combinations in the lanman
484 +Since the number of possible combinations in the LANMAN
485 password is relatively low compared to the other one,
486 and it's easy to see if it's shorter than 8 chars or not
487 it's used first in brute-force-crackers.
488
489 -This program, however, don't care at all what the old
490 -one is, it just overwrites it with the new one.
491 +This program, however, does not care at all what the old
492 +passowrd is, it just overwrites it with the new one.
493
494 Ok. So, how do we find and identify the V struct?
495 Yeah.. that was the hard part.. The files structure
496 @@ -204,4 +212,4 @@
497 0x0035a8 80 REG_BINARY <F>
498 0x003228 508 REG_BINARY <V>
499
500 -For more techincal info, look it up in the source code.
501 +For more technical info, look it up in the source code.