Using chntpw to recreate a Windows registry key

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Using chntpw to recreate a Windows registry key

Postby knight_beat » Thu Nov 15, 2012 4:40 pm

I managed to delete the UserInit registry key on my Windows XP box and have found that I can no longer login to the machine (it logs in for a second, then logs off again).

"Ah ha!", I thought. I've read that chntpw is useful for this type of thing, so I went and installed it. I can access the Windows registry and navigate to \Windows NT\CurrentVersion\Winlogon. Next, I create a key called 'UserInit' using the nk command and edit it using 'ed'. This produces a response that I should specify the buffer size (I arbitrarily set it at 88 ).

However, I can't work out what I'm supposed to do next. If I enter an ASCII string of any type, I just get a question mark response. If I try to save the non-existent key value I get a message that it cannot be saved as the buffer is unchanged. Additionally, the newly created key also disappears when I exit chntpw.

I'm probably missing something obvious, but I can't work out how to add a string value to a newly created key. I've gone through the usual search engine route, but the tutorials focus upon editing existing keys and the man page is fairly useless. Can anyone help?
knight_beat
 
Posts: 3
Joined: Thu Nov 15, 2012 4:23 pm

Postby catgate » Thu Nov 15, 2012 4:49 pm

I'll give you full marks for dogged persistence.
How many more people have taken until now to find out the full panoply of "delights" of M$ XP.
I gave in with M$ 98SE.
Oh, sod it.
catgate
LXF regular
 
Posts: 1064
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby towy71 » Thu Nov 15, 2012 7:45 pm

This is a Linux forum and while your persistence is admired wanting to use an unsupported (crap) system, if you really want to know write to Microsoft!

When you've got over that and start to use anything else Linux and come back to us, we really want to help people :D
still looking for that door into summer
User avatar
towy71
Moderator
 
Posts: 4264
Joined: Wed Apr 06, 2005 2:11 pm
Location: wild West Wales

Postby knight_beat » Thu Nov 15, 2012 9:41 pm

Strange 'advice'. chntpw is a Linux application. I'm running it under Ubuntu. The question relates to the behaviour of a Linux application. Why are you suggesting it's out of scope for the forum?
knight_beat
 
Posts: 3
Joined: Thu Nov 15, 2012 4:23 pm

Postby nelz » Thu Nov 15, 2012 10:35 pm

Maybe you should have said so in the first place. Posting a Windows question to a Linux forum, especially as a first post, is unlikely to get the most positive of responses.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8524
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby knight_beat » Thu Nov 15, 2012 11:33 pm

towy71, nelz, why the hostility? I came here looking for advice on a reasonably well-known Linux application. I hoped that people here would have experience of the tool and politely asked if someone could point me in the right direction. Instead, I'm being attacked by two moderators who have seen Windows mentioned in the title, jumped to the wrong conclusion, and are now on the defensive.

I suppose I could have mentioned that I've been using Linux for a number of year and have a largish collection of LXF mags (I recall receiving a subscription copy of LXF #001 through the post after Amiga Format closed), but it seems unnecessary to have to establish your credentials before asking a question.

Congratulations, you've won. I should have realised that the sub-forum title was shorthand for 'Help! (unless you want to use Linux applications to resolve a non-Linux issue'). I realise my error in asking for help and will go back to lurker mode.
knight_beat
 
Posts: 3
Joined: Thu Nov 15, 2012 4:23 pm

Postby lok1950 » Thu Nov 15, 2012 11:58 pm

You might try posting in the Other OS sub-forum maybe that will get their shorts unknotted ;)

Enjoy the Choice :)
User avatar
lok1950
LXF regular
 
Posts: 1036
Joined: Tue May 31, 2005 5:31 am
Location: Ottawa

Postby towy71 » Fri Nov 16, 2012 12:49 am

knight_beat wrote:towy71, nelz, why the hostility?
The question was about booting a Windows XP box and that you have broken the system registry, I'm sorry if I got that wrong :?

Have you read through all the faqs on http://pogostick.net/~pnh/ntpasswd/ ? It looks like there are enough to be going on with ;-)

See I do like to help :oops:
still looking for that door into summer
User avatar
towy71
Moderator
 
Posts: 4264
Joined: Wed Apr 06, 2005 2:11 pm
Location: wild West Wales

Postby nelz » Fri Nov 16, 2012 1:08 am

Hostility? Attacked? Where in my post did you find those?

You posted a question about repairing a broken Windows system in a Linux help forum, with no mention of using Linux to do so. In fact, your use of backslashes when describing your actions implied you were not using Linux.

My first reaction when seeing your post was that it may be spam, the sort of message that magically acquires links after a short time. However, I wasn't sure so waited. You later explained that you were using a Linux tool under Ubuntu, had you done so at the start you could have avoided the confusion. Remember the only information we had to go on was the words you posted, and the only OS mentioned in those words was Windows.

We're not a bad bunch in here, but the quality of the answers you get depends on the quality of the questions you ask.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8524
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby Ram » Fri Nov 16, 2012 1:22 am

Is it a single user machine or have you also set an admin password ?

If you have then try starting in safe mode, this should give you the option to login to the admin account.

Also have a read of http://forums.spybot.info/blog.php?bt=211

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1679
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby Marrea » Fri Nov 16, 2012 1:14 pm

I started reading knight_beat’s original query and saw UserInit and Windows XP and immediately thought hmm we have a Windows query here. But then I read on and saw chntpw and thought that doesn’t sound like a Windows program and nk and ed didn’t sound like Windows commands. When I reached the last paragraph and saw man mentioned I thought OK he’s talking about a Linux program. But I double-checked by looking at the page itself and saw “This manual page was written by Javier Fernandez-Sanguino Peña <jfs@computer.org>, for the Debian GNU/Linux system (but may be used by others)”, which definitely confirmed it was a Linux program.

Um, isn't it a teeny bit harsh - to say nothing of not being very welcoming - to find fault with a new member simply because of the order in which he placed his words. Give him a chance to get settled in first. After all, his question was fairly short and it didn’t take very long to read through to the end to get the full gist of what he was on about.

knight_beat
If you’re still lurking and reading this I was wondering whether you have an XP installation disc, as I have come across various websites which mention using one to reinstate UserInit. See as one example http://www.ehow.com/how_6914988_extract ... t-exe.html
However, you need to be aware of the warning at the end of the article about different service packs having different versions of userinit.exe. So if you have an XP service pack 2 disc it probably won’t work if you have upgraded your OS to service pack 3.
User avatar
Marrea
LXF regular
 
Posts: 1877
Joined: Fri Apr 08, 2005 9:32 pm
Location: Chilterns, West Hertfordshire

Postby towy71 » Fri Nov 16, 2012 2:58 pm

On reflection perhaps I was a little abrasive, my bad :oops:

I definitely don't want to discourage people from using this site,I do hope the OP is still lurking here ;-)
still looking for that door into summer
User avatar
towy71
Moderator
 
Posts: 4264
Joined: Wed Apr 06, 2005 2:11 pm
Location: wild West Wales


Return to Help!

Who is online

Users browsing this forum: No registered users and 2 guests