Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 2000

Reader to Reader - April 2000

RSS
Subscribe to Windows IT Pro | See More Domains Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

[Editor's Note: Share your Windows 2000 and Windows NT discoveries, comments, problems, solutions, and experiences with products and reach out to other Windows 2000 Magazine readers (including Microsoft). Email your contributions (400 words or less) to r2r@win2000mag.com. Please include your phone number. We edit submissions for style, grammar, and length. If we print your submission, you'll get $100.]

Recover Administrator Passwords
I've seen many methods for recovering a forgotten administrator password on a Windows NT machine. However, most of the solutions are potentially destructive or unnecessarily complex. I've used the following easy-to-use solution on NT 4.0 machines, but I think it works on all NT versions.

First, shut down and reboot the machine so that you can gain access to the system's installation directory. You can use a DOS disk to access a FAT partition's installation directory and NTFSDOS to access an NTFS partition's installation directory. After you access the installation directory, rename logon.scr as logon.scr.back, then copy command.com to logon.scr. After you reboot the machine and wait about 15 minutes, the system will present you with a DOS prompt. At this point, you have full administrator access. Through the command prompt or User Manager, add a new administrator or change the administrator password, rename logon.scr.back to logon.scr, and close the DOS window.


Generate a Filename from the Current Date
To generate a filename derived from the current date, you can enable command extensions and use the For command and /f switch to parse the current date, which you use the date /t command to obtain. For example, the following command parses the current date into four tokens, which it delimits with a slash (/), hyphen (-), or a space:

for /f "tokens=1-4 delims=/- "
   %%i in ('date /t') do
   work.bat %%j-%%k-%%l

The first token is %%i, the second token is %%j, the third token is %%k, and the fourth token is %%l.

The format of the string that date /t returns is always numeric. However, the order of the day, month, and year, as well as the delimiter, depends on how you set the Short date style on the Date tab of the Control Panel Regional Settings applet. On my machines, the date /t command returns the date in the form Tue 14-09-1999 or Tue 14/09/1999. Thus, I need to specify three possible delimiters.

In the previous script, you can use any command following the do keyword. In my example, I call another batch file and pass to that batch file the current date that I rebuilt using hyphens as separators. You can use a date in the following format to rename an existing file:

for /f "tokens=1-4 delims=/- "
   %%i in ('date /t') do rename
   output.txt %%j-%%k-%%l.txt

Alternatively, you can use the date as a filename and pipe output directly to the new file, as follows:

for /f "tokens=1-4 delims=/- "
   %%i in ('date /t') do echo
   Hello >%%j-%%k-%%l.txt
   Previous  [1]  2  3  Next 


Reader Comments
<br><br>I read Reader to Reader: "Recover Administrator Passwords" (April 2000) about how to log on to a Windows NT computer as the administrator when the administrator's password is lost or forgotten. Brian Laing instructs readers to use a DOS or NTFSDOS bootable floppy disk to access the \winnt directory, rename logon.scr to logon.scr.back, then copy command.com to logon.scr.
When I tried the technique, it didn't work. However, I tried copying cmd.exe to logon.scr, and that worked. About 15 minutes after I rebooted, the cmd.exe window appeared, and I was able to change the administrator's password. I exited cmd.exe and proceeded to log on as the administrator with the new password.<br><br>

­Nicholas Pantelopoulos December 01, 2000


Do you think this procedure will work on Windows 2000?

Eric Chapman February 08, 2001


I dont understand how to do this procedure, Can someone please give me step by step instructions on how, to view/reset a XP admin account? Thanks a bunch.

Anonymous User January 13, 2005


Hi, I tried the logon.scr tric on windows 2000 Professional with SP4. It did NOT work. I got "Access is denied" error. Can somebody tell me how to do this in Windows 2000 Professional?
Thanks.

Anonymous User February 03, 2005


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events SQL Server 2008 – Can You Wait? | Philadelphia

SQL Server 2008 – Can You Wait? | Atlanta

SQL Server 2008 – Can You Wait? | Chicago

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing