CHNTPW(8) System Manager's Manual CHNTPW(8)NAME
chntpw - utility to overwrite Windows NT/2000 SAM passwords
SYNOPSIS
chntpw [options] <samfile> [systemfile] [securityfile] [otherreghive] [...]
DESCRIPTION
This manual page documents briefly the chntpw command. This manual page was written for the Debian distribution because the original pro-
gram does not have a manual page.
chntpw is a utility to view some information and change user passwords in a Windows NT/2000 SAM userdatabase file, usually located at WIN-
DOWSsystem32configSAM on the Windows file system. 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.
OPTIONS -h Show summary of options.
-u username
Username to change. Default is Administrator
-l List all users in the SAM database.
-i Interactive: list all users (as per -l) and then ask for the user to change.
-e Registry editor with limited capabilities.
-d Use buffer debugger.
-t Show hexdumps of structs/segments (deprecated debug function).
EXAMPLES
ntfs-3g /dev/sda1 /media/win ; cd /media/win/WINDOWS/system32/config/
Mount the Windows file system and enters the directory WINDOWSsystem32config where Windows stores the SAM database.
chntpw SAM system
Opens registry hives SAM and 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).
chntpw -l SAM
Lists the users defined in the SAM registry file.
chntpw -u jabbathehutt SAM
Prompts for password for jabbathehutt and changes it in the SAM registry file, if found (otherwise do nothing).
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
http://pogostick.net/~pnh/ntpasswd/
There is more information on how this program works available at /usr/share/doc/chntpw registry works.
AUTHOR
This manual page was written by Javier Fernandez-Sanguino <jfs@computer.org>, for the Debian GNU/Linux system (but may be used by others).
13th March 2010 CHNTPW(8)
Check Out this Related Man Page
getprpw(1M)getprpw(1M)NAME
getprpw - display protected password database
SYNOPSIS
parm[,parm]] username
DESCRIPTION
displays the user's protected password database settings. This command is available only to the superuser in a trusted system. Normally
it is only used via SAM, see sam(1M).
uses the configuration file default if is not specified. See nsswitch.conf(4).
Options
recognizes the following options.
Specifies to get information from the local user.
Displays the arguments supplied to
in raw format
Displays the database value for the argument passed.
An "invalid-opt" is printed if a list of options passed to contains an invalid option. The rest of the options will be processed.
If is specified without all parameters are displayed in the order given below.
Boolean values are returned as or (for system default values in
Numeric values are specified as positive numbers, 0, or -1. A value of -1 indicates that the field has not been assigned a value in
the database.
Units of time are returned in number of days (>=0), although the database keeps them in seconds. This and other minor differences
between the command parameters and the database fields are consistent with modprpw(1M).
The following parameters for the user can be displayed using the option.
They are listed below in the order shown in The database fields are fully explained in prpwd(4).
user uid
boot authorization flag
audit id
audit flag
minimum time between password changes
maximum password length
password expiration time
password lifetime
last successful password change time
last unsuccessful password change time
account expiration time
last login time interval
password expiration warning time
whether user picks password,
whether system generates pronounceable passwords,
whether password is restricted, i.e, checked for triviality,
NULL passwords are allowed,
Not recommended!
whether system generates passwords having characters only,
whether system generates passwords having letters only,
time of day allowed for login
time of last successful login
time of last unsuccessful login
tty of last successful login
consecutive number of unsuccessful logins so far
tty of last unsuccessful login
maximum unsuccessful login tries
administrator lock,
if on, if off, if not set.
returns the reason for a lockout in a "bit" valued string,
where 0 = condition not present, 1 is present. The position, left to right represents:
1 past password lifetime
2 past last login time (inactive account)
3 past absolute account lifetime
4 exceeded unsuccessful login attempts
5 password required and a null password
6 admin lock
7 password is a *
RETURN VALUE
0 success
1 user not privileged
2 incorrect usage
3 cannot find the password file
4 system is not trusted
EXAMPLES
Displays the database aging fields for user "someusr".
The command displays:
WARNINGS
This command is intended for SAM use only. It may change with each release and can not be guaranteed to be backward compatible.
Several database fields interact with others. The side effects of an individual change may not cause a problem till much later.
Special meanings may apply in the following cases:
o an absent field
o a field without a value
o a field with a zero value
HP-UX 11i Version 3 is the last release to support trusted systems functionality.
AUTHOR
was developed by HP.
FILES
System Password file
Protected Password Database
System Defaults Database
SEE ALSO modprpw(1M), prpwd(4), nsswitch.conf(4).
TO BE OBSOLETED getprpw(1M)