changing the windows7 password from ubuntu

20 views
Skip to first unread message

Pankaj Marghade

unread,
May 26, 2012, 2:47:29 PM5/26/12
to CoFSUG
hi,
Usually many of us face the problem of forgetting the windows7
password. Ubuntu provides the utility for solving this problem. Using
this utility, the windows7 password can be cleared or reset.
This can be done through ubuntu installed in your computer using live
ubuntu cd or removable media (made bootable for ubuntu) also.

Procedure -

1.Install the utility chntpw using regular instalation command i.e.
sudo apt-get install chntpw

2.Now mount the c-drive of windows. You can do this through terminal
or through GUI. If you mount
c-drive through GUI then a number ( for ex- 6790376A8BC562 ) will be
displayed on the top left corner of the screen which you have to
follow in your path which is given below.

3.now go inside the c-drive's folder using cd command
type following path in terminal
cd /media/number(ex - 6790376A8BC562) /Windows/System32/config/

4.Now here we will use chntpw utility.

5.type the following command
sudo chntpw SAM

6.A file containing the information about all users of windows will be
displayed.

7.At the bottom of screen you will see user edit menu showing 5
options as -

1 - Clear (blank) user password
2 - Edit (set new) user password (careful with this on XP or Vista)
3 - Promote user (make user an administrator)
(4 - Unlock and enable user account) [seems unlocked already]
q - Quit editing user, back to user select

first select 4 th option to unlock the account (which is probably
locked now) and then press y to save changes.
now again type the same command i.e. sudo chntpw SAM and this time
select option of your own choice whether you want to clear user
password or set a new user password. In my choice i suggest you to
select option 1 because once you log in the windows7 you can easily
set the password through user accounts.
After you press 1 press y to save changes.Now it will display 0 <SAM>
ok
now if you log in to windows it will not ask you for the password.

note->above command i.e. sudo chntpw SAM will only change the
Administrator password. If you want to change the password of other
account type - sudo chntpw -u <user account name> SAM
rest of the procedure will be same for both the commands.

Pratik Lahoti

unread,
May 27, 2012, 3:38:28 AM5/27/12
to cof...@googlegroups.com
Hi,


--
You received this message because you are subscribed to the Google Groups "CoFSUG" group.
To post to this group, send an email to cof...@googlegroups.com.
To unsubscribe from this group, send email to cofsug+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cofsug?hl=en-GB.


Great job Pankaj! This is certainly useful. Nice hack :)

--
Warm Regards,
Pratik Lahoti
SY B.Tech IT,
College of Engineering, Pune
Registered GNU/Linux User: #550344


Pankaj Marghade

unread,
May 27, 2012, 4:17:03 AM5/27/12
to CoFSUG
thanks pratik,
but this shows how poor windows7 security is. FOSS simply great.!

On May 27, 12:38 pm, Pratik Lahoti <pratik...@gmail.com> wrote:
> Hi,
>
> Warm Regards*,*
> *Pratik Lahoti
> *SY B.Tech IT,

Sagar Patil

unread,
May 27, 2012, 8:23:49 AM5/27/12
to cof...@googlegroups.com
Thanks for the trick.
Can we change password of Ubuntu or Fedora using this utility?
If yes, then what location should we head up?
--
Warez Jack

shirish शिरीष

unread,
May 27, 2012, 11:25:52 AM5/27/12
to cof...@googlegroups.com
at bottom :-

On Sun, May 27, 2012 at 5:53 PM, Sagar Patil <ware...@gmail.com> wrote:
> Thanks for the trick.
> Can we change password of Ubuntu or Fedora using this utility?
> If yes, then what location should we head up?

Dear Sagar,
First of all if possible don't top-post. It makes it harder to keep
track who said what.

I haven't had to do what you asked a long time but I do remember a
time I had to do this. The answer was go to rescue mode (in Grub) and
use passwd root to do that. Failing that use a Debian/Ubuntu/Fedora
live CD mount the partition and go to the mounted partition and give
the command again

#passwd root

And you should be able to change.

This is in case you don't remember the current password. I have read
ways in which you can make it secure so even this does not work but
that's outside the scope of discussion.

Of course if you just want to change password of any user it should be

$ sudo passwd $username

It will ask for current password and then you can change it.

Till l8er.
--
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17
Reply all
Reply to author
Forward
0 new messages