Welcome to Sign in | Join | Help
in
Home Blog Forums

The Lazy Admin

Securing Local Administrator Accounts

Sponsor


Part of securing your Windows network environment is securing your desktops. Part of securing your desktops, is securing the local administrator account on said desktops. Best practice for this, is to assign the local admin account a strong password, rename the account, and disable it, however doing this by hand on a dozen desktops is cumbersome, on a thousand, its insane. The VBScript below will parse over a list of PC’s from a text file, rename the admin account, and reset it’s password to values specified in the script. Like all script, it should be taken with two Advil, and a large espresso.

To run this script you will need to edit the following lines: ' --- config --- strComputerList = "NameOfTextFile" ' text file containing list of PC's 1 per line strNewName = "NewNameForAdminAccount" ' new name for admin account strNewPassword = "NewPassword" ' new password (make sure it meets password policy requirements) ' --- end config --- We also need to create a text file with a list of all the PCs that we want to run this script on. One PC per line and you can use the IP or the computers name. Now before we run this script lets take a look at a default Windows install where we will see the local administrator account with the name Administrator. We can also see that it is enabled.

Running the script is as simple and entering the following command from the command prompt. cscript.exe renameresetdisable.vbs Once complete if we look at the local users we will see the account has been renamed and is now disabled.

The password is also changed but we can't see that ;)

For more information see:

RenameResetDisable VBS Script Download





Published Monday, July 17, 2006 5:34 AM by rodney.buike
Filed under: ,

Comments

No Comments
Anonymous comments are disabled


All postings are provided "AS IS" with no warranties, and confer no rights.
Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.