• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 338
  • Last Modified:

Programatically change Administrator Password?

We have a lot of PCs in our NT network. Actually every PC should have the same administrator password, which the user doesn't know. But over the years, the PC were delivered with different passwords. Now we need a routine to change the passwords automatically to something we want. Each PC should have the same password, because of some installations, which need a hidden admin-login, for example. Furthermore it will be reasonable to change the password from time to time.

The changing routine should work without user interaction during startup. We are thinking about writing a (Delphi?) programm and starting it via autoexec.nt

Any ideas, hints, difficulties or solutions to this?
0
aksystem
Asked:
aksystem
1 Solution
 
carmineCommented:
Would changing the password over the network via a batch script be acceptable?  If so download the follwoing utility:
http://www.jsiinc.com/dl/cryptpwd.zip
and create a batch file as follows:

====== BATCH FILE =====
@echo off
if "%2"=="" goto error
if not exist %1 goto nofile
del %2
REM the text between these remarks is all on one line.
for /f %%m in ('type %1') do cryptpwd.exe -m \\%%m -u Administrator -P newpassword >> %2
REM the above is on one line.
goto done
:error
echo.
echo Usage: pswd.bat wksnlistfile outputfile
echo.
goto done
:nofile
echo.
echo Input file "%1" does not exist.
echo.
:done
===== END OF BATCH FILE ====

You'll also need a file containing a list of all the workstations/servers that you want to change the passwords on.  Pass this as a parameter to the above batch file:

==== Wksn List file ====
wksnname1
workstation2
. etc
==== End of Wksn File ====

When the script has run check your output file for errors.
You can then run this script as often as as required.

0
 
aksystemAuthor Commented:
Thank you, I've tested it and it works.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now