+ Post New Thread
Results 1 to 9 of 9
Scripts Thread, Script to change the local Administrator password on Clients in Coding and Web Development; Does any one have a script that can be run on all the XP Clients on our domain that will ...
  1. #1
    Kyle's Avatar
    Join Date
    Jan 2006
    Posts
    983
    Thank Post
    92
    Thanked 14 Times in 13 Posts
    Rep Power
    21

    Script to change the local Administrator password on Clients

    Does any one have a script that can be run on all the XP Clients on our domain that will change the local administrator accounts password. We have been using the same password on all the clients for a long while now and i would like to change it on all our clients (Which are all XP)

  2. #2

    Norphy's Avatar
    Join Date
    Jan 2006
    Location
    Harpenden
    Posts
    2,494
    Thank Post
    57
    Thanked 346 Times in 267 Posts
    Blog Entries
    6
    Rep Power
    127

    Re: Script to change the local Administrator password on Clients

    There is a SysInternals tool which will change the local admin password on all of the machines on the domain

    It's called PsPasswd and it's part of the PsTools suite available here

    usage: pspasswd [\\computer[,computer[,...] | @file [-u username [-p password]]] Username [NewPassword]]

    To change the password on all domain PCs, use \\* instead of \\<computer>

  3. #3
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,993
    Thank Post
    120
    Thanked 286 Times in 263 Posts
    Rep Power
    107

    Re: Script to change the local Administrator password on Clients

    Theres also the sample code in the Microsoft Scripting Centre which you can use but Norphy's post seems to be the easiest .

  4. #4

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,819
    Thank Post
    110
    Thanked 588 Times in 509 Posts
    Blog Entries
    1
    Rep Power
    226

    Re: Script to change the local Administrator password on Cli

    I have a batch file sitting in the netlogin share. It contains the following:

    Code:
    net user Administrator %1
    If you set this up as a machine start-up script you can specify the password to set in the parameter section. Makes it a little more secure than having your local admin password embedded in the script.

  5. #5
    k-strider's Avatar
    Join Date
    Oct 2006
    Location
    Gloucester
    Posts
    358
    Thank Post
    7
    Thanked 40 Times in 30 Posts
    Rep Power
    24

    Re: Script to change the local Administrator password on Cli

    i do it almost the same as Geoff though i put the password in the file and then explicitly denied read access to those groups i didn't want to see it.. but i might change it now... hadn't thought of that...

  6. #6
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: Script to change the local Administrator password on Cli

    Quote Originally Posted by Geoff
    I have a batch file sitting in the netlogin share. It contains the following:

    Code:
    net user Administrator %1
    If you set this up as a machine start-up script you can specify the password to set in the parameter section. Makes it a little more secure than having your local admin password embedded in the script.
    I think your parameters will be stored in an INI file which will be copied down to the PC Geoff, although I can't remember exactly where off the top of my head.

    Here's another possibility...

    Write an AutoIT script and embed the password as an encoded RC4 string. AutoIT can decode this then issue the command line. In addition, the script can be compiled to .EXE and password protected to prevent decompilation. Might be a bit OTT though!

    I once toyed with a script that would set the Administrator password of the PC based on the MAC address, encrypted in some way. That way, it would be possible to release the Admin password of a single PC should it be necessary. You would not need to record the password as it could be regenerated using the same algorithm, given the MAC address.

  7. #7

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,819
    Thank Post
    110
    Thanked 588 Times in 509 Posts
    Blog Entries
    1
    Rep Power
    226

    Re: Script to change the local Administrator password on Clients

    I think your parameters will be stored in an INI file which will be copied down to the PC Geoff, although I can't remember exactly where off the top of my head.
    well it'll be in the DC's sysvol share under the GPO's GUID. However as it's a machine policy it'll only be readable by 'Domain Computers' AFAIK.

  8. #8
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: Script to change the local Administrator password on Cli

    Quote Originally Posted by Geoff
    well it'll be in the DC's sysvol share under the GPO's GUID. However as it's a machine policy it'll only be readable by 'Domain Computers' AFAIK.
    Some client side extensions record historical data on the PC where they execute though and if that's the case, they might just be readable by 'Power Users'. I can't say for sure exactly what is recorded, but this article suggests that it does happen.

  9. #9

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,819
    Thank Post
    110
    Thanked 588 Times in 509 Posts
    Blog Entries
    1
    Rep Power
    226

    Re: Script to change the local Administrator password on Clients

    No one has Power Users group membership on my network. I don't use it as it's horribly broken. I'll have a look Monday though and see if I can hack my network from a child's account.

SHARE:
+ Post New Thread

Similar Threads

  1. Change Password Permissions
    By Jamie_a in forum Windows
    Replies: 6
    Last Post: 17th December 2007, 03:20 PM
  2. Local Administrator Password
    By witch in forum Windows
    Replies: 21
    Last Post: 28th June 2007, 04:32 PM
  3. Bulk Change Local Administrator Passwords.
    By Nij.UK in forum Windows
    Replies: 14
    Last Post: 15th June 2007, 01:45 PM
  4. Local Administrator Password Puzzle
    By Andie in forum Windows
    Replies: 18
    Last Post: 11th February 2007, 09:14 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •