Announcement

Collapse
No announcement yet.

Script to change administrator password

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script to change administrator password

    Hi, I want to change local administrator password in 100 computer, there's a script can provide this purpose?
    Thanks in advance.

  • #2
    place this line in batch and run it as a logon /startup script
    Code:
    net user administrator password
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      There's a power users can perform this task correctly?No users got administators right in our network. If not what is the solution?

      Comment


      • #4
        try it, or run it via GPO as startup script?
        Marcel
        Technical Consultant
        Netherlands
        http://www.phetios.com
        http://blog.nessus.nl

        MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
        "No matter how secure, there is always the human factor."

        "Enjoy life today, tomorrow may never come."
        "If you're going through hell, keep going. ~Winston Churchill"

        Comment


        • #5
          What's your opinion about this article http://www.petri.com/change_user_pas...and_prompt.htm

          Comment


          • #6
            good. why?
            Marcel
            Technical Consultant
            Netherlands
            http://www.phetios.com
            http://blog.nessus.nl

            MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
            "No matter how secure, there is always the human factor."

            "Enjoy life today, tomorrow may never come."
            "If you're going through hell, keep going. ~Winston Churchill"

            Comment


            • #7
              In that article, it's wrote if only users with administator's right can perform the syntax completely. That's answer my question, but you told me to just try it, I did it and it failed. There's another ways (scripts) to change the password without having administrator's right?
              Thanks in advance.

              Comment


              • #8
                did you also try it to run it via a GPO?
                Marcel
                Technical Consultant
                Netherlands
                http://www.phetios.com
                http://blog.nessus.nl

                MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                "No matter how secure, there is always the human factor."

                "Enjoy life today, tomorrow may never come."
                "If you're going through hell, keep going. ~Winston Churchill"

                Comment


                • #9
                  Just tried, got the same error as running localy

                  Comment


                  • #10
                    have a look at this.

                    use this and then call you're batch.

                    program is sanur: http://www.commandline.co.uk/sanur/
                    Marcel
                    Technical Consultant
                    Netherlands
                    http://www.phetios.com
                    http://blog.nessus.nl

                    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                    "No matter how secure, there is always the human factor."

                    "Enjoy life today, tomorrow may never come."
                    "If you're going through hell, keep going. ~Winston Churchill"

                    Comment


                    • #11
                      Hi,I found a tool in Pstools suite called pspasswd http://www.sysinternals.com/ntw2k/fr...pspasswd.shtml , it's cover my need with a few notes. I just have to run that tool from my computer /any computers in the network to change my clients local administrator password without worried others users will see my admin password (it's work remotely). But, it's only change an active computers accounts only. If there're some computers not activated during the progress it won't changed. So when we execute that tool we have make a list of active computers at that times and will change the others another times.

                      Comment


                      • #12
                        Dear lzd212,

                        I think Dumber has pointed out the right way to solve this situation. Before I go into the details of what I've done to make it works, I would like to go briefly over the concepts of "logon" scripts.

                        There are four types of them:

                        1. Group Policy logon / logoff scripts.
                        2. Group Policy Computer startup / shutdown scripts.
                        3. Domain User logon scripts.
                        4. Local user logon scripts.

                        Type 1 script executes when a USER logs on or logs off. And it executes with that user privilege.

                        Type 2 script executes when the COMPUTER starts up or shuts down. It executes in context of "Local System Account".

                        Type 3 script executes when a domain user logs on. The difference is type 3 works on all Windows versions whereas type 1 only works with Windows 2000 and up.

                        Type 4 script: the name says itself. It only executes when the user logs on locally.

                        Now let's go back to your case. It failed because you were running with user log on script (type 1) instead of computer one. So your question of "There's another ways (scripts) to change the password without having administrator's right? " has been answered. The answer for it will be type 2 log on script. "Local System Account" has unlimited rights like the workstation Administrator.

                        I tested by changing password for administrator account on workstation in the domain by using type 2 script. Batch file: net user admin password It worked perfectly.

                        I was afraid a bit as the admin password was stored in plain text. But Microsoft also has a utlity to encode the script. It's called Script Encoder. You can download it here and encode yours.

                        Sorry I'm kinda hungry now and I don't think I have energy to go into details of what I've done but if you need it I'll be happy doing it in the next thread

                        Regards,
                        Teamwork

                        Comment


                        • #13
                          What about this script i wrote a long time ago?
                          http://cwashington.netreach.net/depo...tType=vbscript

                          (note the updates and changes in the bottom of the posts)

                          Martin77.

                          Comment


                          • #14
                            Re: Script to change administrator password

                            Hi Guys,

                            This is deepak singla from india. i am system administrator in telecom industry. i am facing problem these days. I have to change local administrator passoword of all computer in my domain. i have two option one is manual or other is by batch script. After lot's of work on script, my problem is still not solved. pls Help me on this issue. Pls provide me the script if any one has. mail me on :- [email protected] OR reply on this message.

                            Thanks
                            Deepak singla

                            Comment


                            • #15
                              Re: Script to change administrator password

                              I noticed that the URL above is no longer available...
                              use the script attached (change the extension to vbs), and post here if you have any questions.
                              good luck,
                              martin77.
                              Attached Files

                              Comment

                              Working...
                              X