Bug 755622 - password reset mode of chntpw does nothing
Summary: password reset mode of chntpw does nothing
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: chntpw
Version: 15
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Conrad Meyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-21 15:54 UTC by Stephane Adenot
Modified: 2011-12-30 00:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-19 01:46:14 UTC
Type: ---


Attachments (Terms of Use)

Description Stephane Adenot 2011-11-21 15:54:05 UTC
Description of problem:

Using chntpw for clearing a Windows password does nothing.

Version-Release number of selected component (if applicable):
chntpw-0.99.6-16.110511

How reproducible:
Always

Steps to Reproduce:
1. chntpw -u <user> <sam file>
2. select menu item 1 (clear user password)
3. type "y" (write sam file)
  
Actual results:
User password not cleared, sam file unchanged 

Expected results:
User password should have been cleared

Additional info:
This is due to a bug introduced by a patch named "chntpw-110511-robustness.patch".
Here is the patch to correct the above patch:

diff -r -U 3 chntpw-110511/ntreg.c chntpw-110511.new/ntreg.c
--- chntpw-110511/ntreg.c	2011-11-21 14:42:45.369173605 +0100
+++ chntpw-110511.new/ntreg.c	2011-11-21 14:43:38.045876946 +0100
@@ -197,7 +197,10 @@
    len = strlen(ibuf);
    
    if (len)
+   {
       ibuf[len-1] = 0;
+      --len;
+   }
    
    return len;
 }

Comment 1 Conrad Meyer 2011-12-19 01:23:29 UTC
Fixed and building in rawhide here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3591818

Comment 3 Fedora Update System 2011-12-19 09:25:11 UTC
chntpw-0.99.6-17.110511.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/chntpw-0.99.6-17.110511.fc15

Comment 4 Fedora Update System 2011-12-19 09:25:14 UTC
chntpw-0.99.6-17.110511.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/chntpw-0.99.6-17.110511.fc16

Comment 5 Fedora Update System 2011-12-30 00:57:26 UTC
chntpw-0.99.6-17.110511.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2011-12-30 00:59:29 UTC
chntpw-0.99.6-17.110511.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.