Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fdb9251b6 | ||
|
|
3fdb1c13ec | ||
|
|
269463fc87 | ||
|
|
92f1cfdadf |
7 changed files with 182 additions and 21 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
chntpw-source-080526.zip
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: chntpw
|
||||
# $Id$
|
||||
NAME := chntpw
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
4
chntpw-README.Dist
Normal file
4
chntpw-README.Dist
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
cpnt is depricated now (I think) because of ntfs-3g. Furthermore
|
||||
reged is probably less useful than regedit.exe under WINE, but
|
||||
as both of these might be useful for someone trying to run some
|
||||
old script it's probably worthwhile to include them both.
|
||||
96
chntpw-chntpw.8
Normal file
96
chntpw-chntpw.8
Normal file
|
|
@ -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 <jfs@computer.org>,
|
||||
for the Debian GNU/Linux system (but may be used by others).
|
||||
80
chntpw.spec
Normal file
80
chntpw.spec
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
Name: chntpw
|
||||
# Version is taken from HISTORY.txt
|
||||
Version: 0.99.6
|
||||
Release: 5%{?dist}
|
||||
Summary: Change passwords in Windows SAM files
|
||||
Group: Applications/Engineering
|
||||
License: GPLv2
|
||||
URL: http://home.eunet.no/~pnordahl/ntpasswd/
|
||||
Source0: http://home.eunet.no/~pnordahl/ntpasswd/chntpw-source-080526.zip
|
||||
Source2: chntpw-README.Dist
|
||||
# The man page is borrowed from Debian
|
||||
Source3: chntpw-chntpw.8
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: openssl-devel
|
||||
|
||||
|
||||
%description
|
||||
This is a utility to (re)set the password of any user that has a valid
|
||||
(local) account on your Windows NT/2k/XP/Vista etc system. You do not
|
||||
need to know the old password to set a new one. It works offline, that
|
||||
is, you have to shutdown your computer and boot off a floppydisk or CD
|
||||
or another system. Will detect and offer to unlock locked or disabled
|
||||
out user accounts! There is also a registry editor and other registry
|
||||
utilities that works under linux/unix, and can be used for other things
|
||||
than password editing.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-080526
|
||||
cp -p %{SOURCE2} README.Dist
|
||||
sed -e 's/\r$//' WinReg.txt > WinReg.txt.eol
|
||||
touch -c -r WinReg.txt WinReg.txt.eol
|
||||
mv WinReg.txt.eol WinReg.txt
|
||||
|
||||
|
||||
%build
|
||||
make CC="%__cc" CFLAGS="$RPM_OPT_FLAGS" LIBS="-lcrypto" chntpw cpnt reged
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
cp chntpw $RPM_BUILD_ROOT%{_bindir}
|
||||
cp cpnt $RPM_BUILD_ROOT%{_bindir}
|
||||
cp reged $RPM_BUILD_ROOT%{_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8/
|
||||
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc GPL.txt LGPL.txt README.txt regedit.txt WinReg.txt HISTORY.txt
|
||||
%doc README.Dist
|
||||
%{_bindir}/chntpw
|
||||
%{_bindir}/cpnt
|
||||
%{_bindir}/reged
|
||||
%{_mandir}/man8/%{name}.8*
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Oct 11 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-5
|
||||
- Bump because force-tag was removed. Please add it back.
|
||||
|
||||
* Sat Oct 11 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-4
|
||||
- Fix EOL encodings in WinReg.txt.
|
||||
|
||||
* Sat Oct 11 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-3
|
||||
- More miscellaneous small changes.
|
||||
|
||||
* Fri Oct 10 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-2
|
||||
- Revert to original Makefile.
|
||||
- Miscellaneous small changes.
|
||||
|
||||
* Wed Oct 1 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-1
|
||||
- Initial package.
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
09addfe7ae469677da39ed66d83858d3 chntpw-source-080526.zip
|
||||
Loading…
Add table
Add a link
Reference in a new issue