How to reset a Windows password with Ubuntu
July 28th, 2010
If you have forgotten your administrator password for Windows, you can use a Ubuntu Linux live CD or live USB to reset the password. This tutorial will show you how to do that, step by step.
There are many ways to get Ubuntu Linux. You can find more details about that here.
If you run into any problems or have any questions, the folks at the Ubuntu Forums are very helpful and friendly.
I will not be answering any support questions posted as comments here.
Step 1: Boot up Ubuntu
With the Ubuntu CD in your optical drive or with the Ubuntu USB plugged into your computer, make sure your BIOS is set to boot from CD or USB before your hard drive. You can usually enter your BIOS settings by pressing F1, F2, F9, F10, F12, Esc, or Del during bootup, depending on the kind of computer you have.
![]()
After Ubuntu boots up, you’ll be asked if you want to try Ubuntu or install it. You definitely want to just try it at this point.
Step 2: Install the password reset software
Installing software on Ubuntu is a bit different from installing software on Windows. Instead of going to a website to download setup files, you just tell the software package manager what you want installed, and it fetches it for you off some servers. It’s a lot like the iTunes App Store or Android Market.
This does assume that you have a working internet connection (wired preferred, but wireless can work, too). If, for some reason, your internet connection isn’t working on the computer you want to reset the password for, you can also download the chntpw .deb using another computer, transfer it over via USB, and then double-click it to install it.
![]()
First we want to make sure we have the proper software sources enabled to install chntpw.
Go to System > Administration > Software Sources
![]()
Make sure both the Universe and Multiverse repositories are checked (or “ticked,” if you’re not American). Click Close and then, when prompted, click Reload.
![]()
Wait for the information about available software to reload.
![]()
Go to System > Administration > Synaptic Package Manager
(Note: to those of you who have installed software in Ubuntu before, you actually do—at least as of Ubuntu 10.04—have to go to Synaptic to install chntpw. You can’t install it through Ubuntu Software Center).
![]()
Press Control-F or click on the Search button to get the search dialogue up. Then search for chntpw.
(Note: you may be tempted to type chntpw into the search filter but it won’t show up there, since Synaptic hasn’t had time to rebuild the search index for quick filtering.)
![]()
Once chntpw pops up in the search results, right-click it and select Mark for Installation.
![]()
Click Apply, and then, when prompted, click Apply again.
![]()
Wait for the Synaptic to download and install chntpw.
Step 3: Mount your Windows drive
In order for you to reset your Windows password, you have to make the Ubuntu live session know that your Windows drive is available for use. This process is called “mounting.”
![]()
To mount Windows, just click on Places and then select your drive. It will be listed by the size of the drive (in this example, 80 GB).
Step 4: Reset your password
chntpw is a terminal-based (not point-and-click) application, so to use it, we’ll have to open up a command-line terminal. Don’t be intimidated. I’ll walk you through the process.
![]()
To open the terminal, go to Applications > Accessories > Terminal
I’m going to be offering a lot of explanation for those who aren’t experienced with the terminal and commands, but if you want to just skip over all that stuff, feel free to just pay attention to the terminal commands and ignore the explanations.
First, you’re going to cd (change directories) to the right Windows directory.
Start typing cd /media/ and then hit the Tab key, and it’ll autocomplete with the address of your mounted Windows drive.
Then type W and hit Tab again to get to either Windows (Windows 7) or WINDOWS (Windows XP). Yes, the terminal is case-sensitive, so upper- and lower-case matters!
Type S or s and hit Tab again to get System32 or system32 (again depending on whether it’s Windows 7 or Windows XP—I forget which it is for Windows Vista).
And do the same for config.
Tab completion makes things a lot simpler, so you don’t have to type every single word out. It also avoids the whole typo issue, in case you aren’t a good typist.
Once you’ve gotten to cd /media/name-of-your-windows-drive/Windows/System32/config or cd /media/name-of-your-windows-drive/WINDOWS/system32/config, hit Enter.
You should then type in sudo chntpw -u username SAM, where username is your actual username. For example, if your username is susan, it should be sudo chntpw -u susan SAM
After you type that in, hit Enter, and you’ll see a whole bunch of terminal output, most of which you can ignore:
Hive
ROOT KEY at offset: 0×001020 * Subkey indexing type is: 666c
Page at 0×7000 is not ‘hbin’, assuming file contains garbage at end
File size 262144 [40000] bytes, containing 6 pages (+ 1 headerpage)
Used for data: 260/20240 blocks/bytes, unused: 9/4144 blocks/bytes.
* SAM policy limits:
Failed logins before lockout is: 10
Minimum password length : 4
Password history count : 4
| RID -|———- Username ————| Admin? |- Lock? –|
| 01f4 | Administrator | ADMIN | dis/lock |
| 01f5 | Guest | | dis/lock |
| 03e8 | susan | ADMIN | |
———————> SYSKEY CHECK <-----------------------
SYSTEM SecureBoot : -1 -> Not Set (not installed, good!)
SAM Account\F : 0 -> off
SECURITY PolSecretEncryptionKey: -1 -> Not Set (OK if this is NT4)
Syskey not installed!
RID : 1000 [03e8]
Username: susan
fullname:
comment :
homedir :
User is member of 1 groups:
00000220 = Administrators (which has 4 members)
Account bits: 0×0214 =
[ ] Disabled | [ ] Homedir req. | [X] Passwd not req. |
[ ] Temp. duplicate | [X] Normal account | [ ] NMS account |
[ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act |
[X] Pwd don’t expir | [ ] Auto lockout | [ ] (unknown 0×08) |
[ ] (unknown 0×10) | [ ] (unknown 0×20) | [ ] (unknown 0×40) |
Failed login count: 0, while max tries is: 10
Total login count: 100
This part is important, though:
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
Select: [q] >
I would highly recommend typing 1 to blank the password instead of editing the password. After you type that, hit Enter, and you should see
Hives that have changed:
# Name
0
Write hive files? (y/n) [n] :
Type y and hit Enter to confirm the change. Once you see
then you’re done.
![]()
Now you can reboot, and you can log into your admin account with a blank password. Once you’re logged in, you can go to the Control Panel to change your password to something else—something you can remember.
If you’re curious, you can see an older version of this page.
Annoying Android usability issue – Gmail with multiple accounts
July 22nd, 2010
I love my Android phone. It’s a lot of fun, and I think Google has done a lot of good things with the Android platform. There are still some major usability issues, though, that I hope Google will iron out in Android 3.0 (Gingerbread).
Here’s one, for example:
Issue 1664: Gmail should allow choosing the From: address on an account that has multiple addresses
Send As Feature in Gmail
For years, I’ve been using Thunderbird as my email client. I used it on Windows. Then I used it on Ubuntu. Then I used it on Mac OS X. Recently, inspired by my move to an Android phone, I decided to go as Google as possible. Google Voice. Google Docs. Google Maps. Google Reader. Gmail. There were some things that took adjusting to in Gmail (conversations instead of messages, anyone?), but I didn’t miss Thunderbird as much as I thought I would. Google gives you nigh-unlimited email storage (I don’t see meeting the 7 GB limit any time soon the way my emails are going), and the interface is simple and quick, and easy to use. More importantly, I can aggregate with Gmail a bunch of email accounts into one, just as I would with a traditional desktop email client (like Thunderbird, Mail, Eudora, or Outlook).
In the regular Gmail web interface, you can choose which of these accounts is the default email address (meaning if you compose a new message, that message will have the from: address be that email address unless you choose otherwise), and you can also choose to have all replies sent from the email the original message was sent to. That means if someone sends an email to my church account and I hit Reply, the reply will appear to come from my church account; and if someone sends an email to my home account and I hit Reply, the reply will appear to come from my home account.
Pretty nifty feature to have. Too bad it’s missing from Android’s Gmail app. In the Android Gmail app, if you compose a new message, it will always come from your Gmail email address, regardless of what your setting is on the web client. And if you reply to a message, it will also come from your Gmail address. That makes it pretty much useless to me in terms of writing emails, seeing as how I use my Gmail account to aggregrate other email accounts, and I basically never want emails to appear to come from my Gmail account.
Fortunately, there’s a workaround, but it’s not pretty. The workaround is not to use the Gmail app. Just use the Gmail web interface in your favorite Android browser (Browser, Opera, xScope, Dolphin, etc.). If you use the mobile version (which is the default) of the web client, you won’t actually get to see your from: address, but it’ll still operate the way it’s supposed to (I tested it on both a reply and a new email). You can switch to the desktop (or “classic”) mode of the web client if you actually want to see the from: address.
Now, Google, how difficult would it really be to fix this problem?
You mean products fail for other reasons?
July 21st, 2010
If you read recent press coverage of Google’s Nexus One, it all seems to make sense. Phones weren’t going to sell well being sold only online without a chance for people to try them in person in a brick-and-mortar store. There wasn’t an advertising campaign for it. Very few articles or blogs about the end of Nexus One seem to think there was a problem at all with the phone itself. No one says the phone wasn’t ready for consumers or that it was too difficult to use.
Yet two years ago when Asus was just starting to be successful with the Eee PC netbook (which came preinstalled with a version of Linux, which Microsoft had to stop right away by resurrecting XP for the first of many times to come), that’s what a lot of the press coverage assumed. Geez. I mean, a lack of advertising campaign or in-person models to try out in the store couldn’t have anything to do with Linux netbooks not selling. It must be that Linux is too hard to use. It must be that Linux isn’t ready for consumers. It must really be that consumers just prefer Windows when given the choice.
Well, there is some truth to that in that the Linux distro Asus chose to put on the Eee PC was essentially crippled (not at all like Ubuntu, PCLinuxOS, Fedora, Debian, OpenSuSE, or any of the other popular distros of the time). It wasn’t even vanilla Xandros. It was a custom Xandros that could be customized only through pasting cryptic commands in the terminal.
Nevertheless, if they’d marketed it correctly, Linux could have been a success. The problem with Linux on “the desktop” (or the laptop or netbook) is the myth of meritocracy. You don’t win by being the best. You win by marketing.
Think about it.
When the iPad was announced, critics focused on the features it didn’t have (no webcam, no Flash, no USB ports), but Apple with its clever marketing department convinced the hoards that the device was magic, so the hoards bought it. If a Linux tablet had been released without Flash, people would have just laughed and said “This is the reason Linux will never succeed—they need to realize the masses use Flash.” But Apple releases a tablet and all of a sudden people are actually saying Flash isn’t necessary. HTML5 is suddenly the wave of the future. Apps for websites are suddenly better than just going to the websites themselves.
I also see a lot of Linux poo-pooers claim Linux doesn’t have any apps, and that Windows users have certain killer apps they need, and that’s why Linux won’t succeed. Well, when Android first started, it had very few apps. In fact, for the end of 2008 and all through 2009, iPhone fanatics kept pointing out how many hundreds of thousands of apps the iTunes App Store had compared to the few thousand Android had. Well, Android now has almost 100,000 apps. If this pace continues, the iTunes App Store and Android Market will probably have the same number of apps by this time next year. The Linux desktop (as opposed to server or embedded) has been around since… the late 90s? Android has been around since 2008. The Linux desktop isn’t mainstream but Android is.
What should we learn from all this? Marketing matters. Being able to test a physical product out yourself matters. Dell selling badly marketed (or even anti-marketed) Ubuntu models on its website isn’t going to sell Ubuntu preinstalled in great numbers, nor are relatively obscure vendors like System76 or ZaReason without a proper store front or brand name recognition.
I would love it if all the bugs in Ubuntu (or some other popular Linux distro) could be fixed. I would love it if some more attention would be paid to ease of use or to making more applications available in the software repositories. I would love that. But that won’t fix Bug #1. If Linux wants to make a dent in the desktop/laptop/netbook world, it needs to give up the idea of being good enough and start embracing the idea of crafting, shipping, and marketing a product—yes, one people can try out in a brick-and-mortar store. In other words, what I said two years ago is still true.
Ubuntu on a Macbook Pro
July 19th, 2010
I’m not abandoning Mac OS X, but you knew it had to happen—I have installed Ubuntu on the Macbook Pro as a dual-boot. It hasn’t been easy, mind you. Previously, I had done a few dual-boot setups with Ubuntu and Windows or Ubuntu and some other Linux distro or even Ubuntu and an older version of Ubuntu. Ubuntu on a Macbook Pro is a totally different experience.
So first I went to the Ubuntu wiki to find out if it was worth my time. According to the Macbook Pro 3,1 page, everything works pretty much out of the box with Ubuntu 10.04 (Lucid Lynx). That was encouraging. Then I read up the generic Apple Intel installation instructions. They didn’t sound too complicated. Install rEFIt, repartition the hard drive, install Ubuntu in the new partitioned space. Easy, right? Well, not so easy. Here are a few bumps I encountered along the way:
- rEFIt didn’t install correctly. After you install it, you should reboot and see the rEFIt menu. No menu. So I had to do some digging and found out there is a script you can run in the terminal to sort of reinstall rEFIt.
- I couldn’t resize my hard drive through Disk Utility or BootCamp. Both failed, claiming there wasn’t enough free space, even though there was plenty (at least 70 GB after I backed up my files to an external hard drive and deleted them, planning to copy them back later). So, believe it or not, I took the hours to completely reinstall Mac OS X from scratch and then repartition the drive.
- Since Ubuntu can’t reliably write to HFS+, I put my music, pictures, etc. on a shared FAT32 partition. Unfortunately, iTunes doesn’t really dig that. If I try to skip to the next song, I get about five seconds of the rainbow circle of death before the next song will actually play. The symlinks from the FAT32 partition also broke at first, too, because initially it was mounted as /Volumes/Storage but then it suddenly became /Volumes/STORAGE. After fixing everything to point to the upper-case mount point, the links appear to be working again.
- Ubuntu would not install the first five times I tried. That’s right. I tried five times. It kept failing in the middle of the installation, claiming the CD was bad or the CD drive was bad or the laptop was too hot. All of those things could have been true to some degree. The CD had a little bit of dirt on it, which I tried to clean off but couldn’t get completely clean. The CD drive was definitely bad. In OS X it was pretty good at reading commercially produced CDs and DVDs but would sometimes reject homebrews (it would spin and try to read for a minute or two and then just spit the disc out). Also, unlike my wife’s new Macbook Pro, this old MBP overheats like nobody’s business. You could probably fry an egg on it. Eventually, I did something that worked, and I’m not sure which part of it did it. I turned the computer off for the night (let it cool down completely). Then I immediately booted it up and while Ubuntu was installing, I never left it alone. I played gBrainy. I looked in the file browser. I changed various settings. I didn’t let the CD rest and give up. So I don’t know if it was having it cool or constantly engaging the live CD session, but eventually Ubuntu did get installed.
- I installed the Nvidia driver, but then Hardware Drivers instructed me to use a more recent driver. After that, suspend didn’t resume. But then I removed the old driver and rebooted, and resume from suspend worked fine, as did Compiz.
- The touchpad works extremely well for two-finger scrolling, but the touch sensitivity is a bit much (and can’t be adjusted, as far as I can tell), so I have to be careful not to tap the touchpad accidentally when trying to scroll; otherwise, I end up clicking. If I turn off tapping to click, then I can’t right-click by tapping down two fingers. A bit annoying.
- Control is a rather small key on the Mac keyboard, but for most navigation it’s used more often than the Cmd key (the Super key, for all intents and purposes). The key placement is a bit odd when you’re used to coming from Mac OS X or even from a regular Windows keyboard. Takes a bit of getting used to.
- I thought Skype was broken, but it wasn’t. I set my account to offline instead of invisible, and apparently if you’re offline you can’t do the Skype test call (it just fails immediately). I didn’t know that, so I was trying all these crazy fixes like uninstalling PulseAudio or whatever. Turns out it just works fine if you’re invisible or online.
- The Picasa from the Google repositories is broken with the latest Lucid kernel. If you download the .deb straight from Google, though, it works just fine.
- I had a 32-bit Ubuntu CD already, so I didn’t really want to bother downloading 64-bit Ubuntu to take advantage of all 4 GB of RAM (and waste another blank CD, since Macs can’t boot from USB). I guess that would have been interesting to try, but 32-bit works quite snappily with only a bit more than 3 GB of RAM being recognized.
Overall, I have to say Ubuntu works quite well on a Mac. I think it even runs a bit cooler, too (still very hot but maybe not hot enough to fry an egg on). My plan is to keep playing around with both (sometimes boot into OS X, sometimes boot into Ubuntu). With a FAT32 partition for files, I have that luxury, except that I will have to be in OS X to import into iTunes and iPhoto—Rhythmbox and Picasa on Ubuntu will automatically watch folders for new files.
Living the Apple and Google life
July 16th, 2010
Ever since Apple rejected the Google Voice application for the iPhone last year, the tech press has tried to play up a corporate rivalry between Apple and Google. Will people pick Android or iPhone? Will Apple make Bing the default search engine on the iPad? Will Google start making touchscreen tablets to “kill” the iPad? I’m sure Eric Schmidt and Steve Jobs don’t get along as much as they used to, and Apple and Google certainly have experienced some overlap in terms of competing markets and target audiences. Nevertheless, for a lot of everyday consumers, the Apple/Google dynamic is more of a hybrid synthesis than a divided pledge to one or the other.
Here are a few examples:
- Me: As some of my Ubuntu-using readers are dismayed about, I recently switched my primary operating system to Mac OS X on a Macbook Pro (still using Ubuntu on the netbook, still will keep updating Ubuntu tutorials). At the same time, I have an Android phone, and I will not be giving it up for an iPhone until Steve Jobs says (in all sincerity, not as a joke) “I love Google Voice and I think it’s the app everyone should install on the iPhone!” To make the most of my Android experience, I use GMail also, even to check my non-GMail accounts (via POP3). And, of course, I use Google as my main search engine.
- My wife: She’s an Apple user through and through. She uses a Mac at work, and she uses a Mac at home. She has an iPhone. She uses Mail, not Thunderbird or GMail. Safari (not Chrome) is her main web browser. At the same time, she has a Nook (Android-based) e-reader, and Google is still her main search engine.
- My pastor: Even this Apple hipster recently traded up his iPhone for an Android phone (albeit an iPhone clone), but he plans to get an iPad to keep up his “street cred.”
- My sister-in-law: She uses a Mac Mini with iTunes and has an iPod, but she also has an Android phone and a GMail and Google Voice account.
- My boss: She uses Google for just about everything. It’s her search engine. GMail is her email. She just got started with Google Voice the other day. She uses Picasa to organize her photos. But she’s an iPhone user.
In fact, I would say, at least among my social circle, the last example is the most typical. Yes, I know a lot of iPhone users. Before they had iPhones, they had iPods. Some of them still use iPods separately from their iPhones. But Google is the main search engine. GMail is the email. Google Voice is starting to catch on. Even if you don’t have an Android phone, there may be other Android devices (like a Nook) that you pick up. Even if you love Google, you may still have an iPhone.
Who’s going to win? Apple or Google? I say both will win. In some ways, both have already won.
P.S. I do know a couple of iPhone users interested in Google Voice. Anyone with a non-jailbroken iPhone who’s been using the two together for a while willing to share the experience of using the Google Voice mobile page in Safari? Pros and cons?