Reconfiguring IP Interface for DHCP from the Command Line
The IP address on a Windows XP system can be changed from a static
value to a
DHCP assigned
IP address from the command line using the command below (presuming you wish
to change the IP address for the interface "Local Area Connection", since you
may have multiple or differently named network connections).
netsh interface ip set address "Local Area Connection" dhcp
You can also set the
DNS servers from the command line using the command below.
netsh interface ip set dns "Local Area Connection" dhcp
References:
-
Configure TCP/IP from the Command Prompt
By Daniel Petri
Petri IT Knowledgebase
[/os/windows/commands]
permanent link
Resetting Password with Offline NT Password & Registry Editor
The date on a repaired laptop I had returned to me, after a motherboard
problem was fixed, was January 28, 2150. The laptop is running Windows
XP Professional. I knew the password for my normal user account on the
laptop, but couldn't remember the password for my administrator account
on the system.
I downloaded
Offline
NT Password & Registry Editor in
ISO format. After
extracting the .iso file from the .zip file I downloaded, I created a bootable
CD from the ISO file. I booted from the boot CD and saw the following.
Disks:
Disk /dev/sda: 80.0 GB, 80026361856 bytes
Candidate Windows partitions found:
1 : /dev/sda1 76316MB BOOT
Please select partition by number or
q = quit
d = automatically start disk drivers
m = manually select disk drivers to load
f = fetch additional drivers from floppy / usb
a = show all partitions found
l = show propbable Windows (NTFS) partitions only
Select: [1]
I hit
Enter to take the default option of one for
/dev/sda1. I then saw the following.
Selected 1
Mounting from /dev/sda1, with filesystem type NTFS
NTFS volume version 3.1.
=========================================================
Step TWO: Select PATH and registry files
=========================================================
What is the path to the registry directory? (relative to windows disk)
[WINDOWS/system32/config] :
Since
WINDOWS/system32/config was the correct location, I hit
Enter and had the opportunity to select the password reset option
by hitting
Enter again.
Select which part of registry to load, use predefined choices
1 - Password reset [sam system security]
2 - RecoveryConsile parameters [software]
q - quit - return to previous
[1] :
For step 3, "Password or registry edit", I had the option to "edit user
data and passwords", which I chose by hitting
Enter.
<>========<> chntpw Main Interactive Menu <>========<>
Loaded hives: <sam> <system> <security>
1 - Edit user data and passwords
2 - Syskey status & change
3 - RecoveryConsole settings
9 - Registry editor, now with full write support!
q - Quit (you will be asked if there is something to save)
What to do? [1] ->
I was then presented with a list of the local accounts on the system. Those
that were disabled or locked were marked as "dis/lock". I
chose the administrator account for which I wished to reset the password
and was presented with information on the account and the opportunity to
blank the password, which is the option I chose.
Failed login count: 1, while max tries is: 5
Total login count: 68
- - - - User Edit Menu:
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 then saw "Password cleared!". I then hit "!" to quit modifying accounts
and then "q" to quit. At the next step, step 4, you will be asked to confirm
whether to actually write the changes to disk. The default response is "n",
so you need to hit "y" to actually apply the changes you've requested.
You will then see "***** EDIT COMPLETE *****". Hitting
Enter will
give you a Linux shell prompt of "$". You can then reboot the system;
remove the CD so the system won't attempt to boot from it again.
When the system booted into Windows XP, I tried logging into the
administrator account. I saw the message "Your password has expired and must be
changed." I entered a new password and was able to login to the administrator's
account.
[/os/windows/utilities/sysmgmt]
permanent link