Import chntpw, for resetting your M$Windows-NT/XP/... password under *Nix.
Useful now that NTFS is enabled by default. Tested by several. OK merdely@. Prodded by "Jiri B" who submitted a similar port.
This commit is contained in:
parent
02e940c277
commit
71b96d926e
43
security/chntpw/Makefile
Normal file
43
security/chntpw/Makefile
Normal file
@ -0,0 +1,43 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2010/11/04 21:59:20 ian Exp $
|
||||
|
||||
ONLY_FOR_ARCHS = i386 amd64
|
||||
|
||||
COMMENT = reset NT/W2K/XP/Vista/W7 password
|
||||
|
||||
V = 100627
|
||||
DISTNAME = chntpw-source-${V}
|
||||
PKGNAME = chntpw-${V}
|
||||
EXTRACT_SUFX = .zip
|
||||
CATEGORIES = security
|
||||
|
||||
HOMEPAGE = http://pogostick.net/~pnh/ntpasswd/
|
||||
|
||||
MAINTAINER = Ian Darwin <ian@openbsd.org>
|
||||
|
||||
# Mix of GPL and LGPL
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
PERMIT_DISTFILES_CDROM = Yes
|
||||
PERMIT_DISTFILES_FTP = Yes
|
||||
WANTLIB = c ssl
|
||||
|
||||
MASTER_SITES = http://pogostick.net/~pnh/ntpasswd/
|
||||
|
||||
MAKE_ENV = CC=$(CC)
|
||||
|
||||
USE_GMAKE = Yes
|
||||
|
||||
NO_REGRESS = Yes
|
||||
|
||||
WRKDIST = ${WRKDIR}/${PKGNAME}
|
||||
|
||||
PROGS = chntpw chntpw.static cpnt reged reged.static
|
||||
DOCDIR = $(PREFIX)/share/doc/chntpw
|
||||
|
||||
do-install:
|
||||
cd $(WRKDIST); $(INSTALL_PROGRAM) $(PROGS) $(PREFIX)/bin
|
||||
$(INSTALL_DATA_DIR) $(DOCDIR)
|
||||
$(INSTALL_DATA) $(FILESDIR)/README.OpenBSD $(DOCDIR)
|
||||
$(INSTALL_DATA) $(WRKDIST)/*.txt $(DOCDIR)
|
||||
|
||||
.include <bsd.port.mk>
|
5
security/chntpw/distinfo
Normal file
5
security/chntpw/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (chntpw-source-100627.zip) = iwRsIHPyfu1yjhhjW6ct1A==
|
||||
RMD160 (chntpw-source-100627.zip) = HY+jAgyYu3SKwuSekc13wr5km0E=
|
||||
SHA1 (chntpw-source-100627.zip) = Syp+ekBsqey2jJq0+2AShkgogG0=
|
||||
SHA256 (chntpw-source-100627.zip) = 6XIlLDn0JsCsr4B+xoLqzegXyqe6+iosf4NTnQ3MnJ4=
|
||||
SIZE (chntpw-source-100627.zip) = 668647
|
30
security/chntpw/files/README.OpenBSD
Normal file
30
security/chntpw/files/README.OpenBSD
Normal file
@ -0,0 +1,30 @@
|
||||
USE AT OWN RISK. READ ALL DOCUMENTS CAREFULLY. One thing worse than
|
||||
being unable to login is being unable to boot; you can get there from here.
|
||||
|
||||
To use this program, you must have built a kernel with the config option
|
||||
|
||||
option NTFS
|
||||
|
||||
(Most kernels built after 2010/09/08 have this enabled by default).
|
||||
|
||||
And, you must have mounted the root of your Windoze filesystem as something like
|
||||
|
||||
mount -t ntfs -o rw /dev/wd1i /mnt
|
||||
|
||||
If your NT disk is small enough to dd to a file on your real disk, you can
|
||||
experiment along these lines (see mount_vnd to understand):
|
||||
|
||||
# mount -t vnd -o c xp-test.hd /dev/vnd0c
|
||||
# mount -t ntfs /dev/vnd0i /mnt
|
||||
|
||||
Then
|
||||
|
||||
cd /mnt/Windows/System32/config
|
||||
|
||||
chntpw -u noobish sam system security ... or other commands,
|
||||
or
|
||||
chntpw SAM SYSTEM SECURITY # sometimes names are upper case.
|
||||
as per the README.txt file in this directory.
|
||||
See also the other text files.
|
||||
|
||||
READ ALL WARNINGS. As it says there and on the web site: USE AT OWN RISK.
|
21
security/chntpw/patches/patch-Makefile
Normal file
21
security/chntpw/patches/patch-Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2010/11/04 21:59:20 ian Exp $
|
||||
--- Makefile.orig Sun Jun 27 15:50:13 2010
|
||||
+++ Makefile Wed Nov 3 21:52:09 2010
|
||||
@@ -10,15 +10,10 @@
|
||||
OSSLPATH=/usr
|
||||
OSSLINC=$(OSSLPATH)/include
|
||||
|
||||
-CC=gcc
|
||||
+CC?=gcc
|
||||
|
||||
-# Force 32 bit
|
||||
-CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -m32
|
||||
+CFLAGS+= -DUSEOPENSSL -g -I. -Wall
|
||||
OSSLLIB=$(OSSLPATH)/lib
|
||||
-
|
||||
-# 64 bit if default for compiler setup
|
||||
-#CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall
|
||||
-#OSSLLIB=$(OSSLPATH)/lib64
|
||||
|
||||
|
||||
# This is to link with whatever we have, SSL crypto lib we put in static
|
12
security/chntpw/pkg/DESCR
Normal file
12
security/chntpw/pkg/DESCR
Normal file
@ -0,0 +1,12 @@
|
||||
"Forgot your Windows NT/2k/XP/Vista admin password?
|
||||
Reinstall? Oh no... But not any more...
|
||||
|
||||
"chntpw 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."
|
2
security/chntpw/pkg/MESSAGE
Normal file
2
security/chntpw/pkg/MESSAGE
Normal file
@ -0,0 +1,2 @@
|
||||
See ${PREFIX}/share/doc/chntpw/README.OpenBSD for information on
|
||||
running this program under OpenBSD.
|
15
security/chntpw/pkg/PLIST
Normal file
15
security/chntpw/pkg/PLIST
Normal file
@ -0,0 +1,15 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/11/04 21:59:20 ian Exp $
|
||||
@bin bin/chntpw
|
||||
@bin bin/chntpw.static
|
||||
@bin bin/cpnt
|
||||
@bin bin/reged
|
||||
@bin bin/reged.static
|
||||
share/doc/chntpw/
|
||||
share/doc/chntpw/GPL.txt
|
||||
share/doc/chntpw/HISTORY.txt
|
||||
share/doc/chntpw/INSTALL.txt
|
||||
share/doc/chntpw/LGPL.txt
|
||||
share/doc/chntpw/README.OpenBSD
|
||||
share/doc/chntpw/README.txt
|
||||
share/doc/chntpw/WinReg.txt
|
||||
share/doc/chntpw/regedit.txt
|
Loading…
Reference in New Issue
Block a user