PC Review Forums Newsgroups Windows XP Windows XP Security Change local Admin password thourgh a .reg file

Reply

Change local Admin password thourgh a .reg file

 
Thread Tools Rate Thread
Old 28-10-2004, 12:20 AM   #1
hustedj
Guest
 
Posts: n/a
Default Change local Admin password thourgh a .reg file


I would like to create a .reg file that when you click on it, it will change
the local admin password to what I want it to be. Is this possible?

Thanks


  Reply With Quote
Old 28-10-2004, 12:41 AM   #2
Carey Frisch [MVP]
Guest
 
Posts: n/a
Default Re: Change local Admin password thourgh a .reg file

It would not be a prudent idea to do that. You would effectively
make your computer accessible to anyone and defeat security.
Very bad idea!

--
Carey Frisch
Microsoft MVP
Windows XP - Shell/User

Be Smart! Protect Your PC!
http://www.microsoft.com/athome/sec...ct/default.aspx

------------------------------------------------------------------------------------

"hustedj" wrote:

| I would like to create a .reg file that when you click on it, it will change
| the local admin password to what I want it to be. Is this possible?
|
| Thanks

  Reply With Quote
Old 28-10-2004, 12:48 AM   #3
hustedj
Guest
 
Posts: n/a
Default Re: Change local Admin password thourgh a .reg file

I know but we are try to change people local admin passwords at the office
to have a specific password and not a password that has lets say no password
at all. We are trying to make them more secure.


"Carey Frisch [MVP]" <cnfrisch@nospamgmail.com> wrote in message
news:e9WaF6HvEHA.2192@TK2MSFTNGP14.phx.gbl...
> It would not be a prudent idea to do that. You would effectively
> make your computer accessible to anyone and defeat security.
> Very bad idea!
>
> --
> Carey Frisch
> Microsoft MVP
> Windows XP - Shell/User
>
> Be Smart! Protect Your PC!
> http://www.microsoft.com/athome/sec...ct/default.aspx
>
> ------------------------------------------------------------------------------------
>
> "hustedj" wrote:
>
> | I would like to create a .reg file that when you click on it, it will
> change
> | the local admin password to what I want it to be. Is this possible?
> |
> | Thanks
>



  Reply With Quote
Old 28-10-2004, 01:04 AM   #4
Shenan Stanley
Guest
 
Posts: n/a
Default Re: Change local Admin password thourgh a .reg file

hustedj wrote:
> I know but we are try to change people local admin passwords at the
> office to have a specific password and not a password that has lets
> say no password at all. We are trying to make them more secure.


net user command line?
(batch script, maybe even have it prompt you or you have to input it..)

--
<- Shenan ->
--
The information is provided "as is", it is suggested you research for
yourself before you take any advice - you are the one ultimately
responsible for your actions/problems/solutions. Know what you are
getting into before you jump in with both feet.


  Reply With Quote
Old 28-10-2004, 01:51 AM   #5
Colin Nash [MVP]
Guest
 
Posts: n/a
Default Re: Change local Admin password thourgh a .reg file


"hustedj" <asdf@asd.com> wrote in message
news:g82dnf49PcLXsB3cRVn-hw@comcast.com...
>I would like to create a .reg file that when you click on it, it will
>change the local admin password to what I want it to be. Is this possible?
>
> Thanks
>


Not through a reg file... but you can make a script (.cmd) file that has the
command:

NET USER ADMINISTRATOR xxxxxx


Replace xxxxxx with whatever the password is. Of course, this is visible
in plain text in the script file so its not very secure. You need to be an
administrator to run do this, obviously.



--

This might be a better solution for you...
http://support.microsoft.com/defaul...kb;EN-US;272530

If you have an account that has admin rights to all machines on the network
(for example a domain admin account), you can use it remotely.


  Reply With Quote
Old 28-10-2004, 02:01 AM   #6
hustedj
Guest
 
Posts: n/a
Default Re: Change local Admin password thourgh a .reg file

How would you do it?


"Shenan Stanley" <news_helper@hushmail.com> wrote in message
news:uHPksVIvEHA.2016@TK2MSFTNGP15.phx.gbl...
> hustedj wrote:
>> I know but we are try to change people local admin passwords at the
>> office to have a specific password and not a password that has lets
>> say no password at all. We are trying to make them more secure.

>
> net user command line?
> (batch script, maybe even have it prompt you or you have to input it..)
>
> --
> <- Shenan ->
> --
> The information is provided "as is", it is suggested you research for
> yourself before you take any advice - you are the one ultimately
> responsible for your actions/problems/solutions. Know what you are
> getting into before you jump in with both feet.
>



  Reply With Quote
Old 28-10-2004, 02:18 AM   #7
hustedj
Guest
 
Posts: n/a
Default Re: Change local Admin password thourgh a .reg file

Cool, Thanks for you help. I will try this tomorrow on a few test PCs


"Colin Nash [MVP]" <cnash x@x mvps.org> wrote in message
news:%23kD3KhIvEHA.1448@TK2MSFTNGP10.phx.gbl...
>
> "hustedj" <asdf@asd.com> wrote in message
> news:g82dnf49PcLXsB3cRVn-hw@comcast.com...
>>I would like to create a .reg file that when you click on it, it will
>>change the local admin password to what I want it to be. Is this possible?
>>
>> Thanks
>>

>
> Not through a reg file... but you can make a script (.cmd) file that has
> the command:
>
> NET USER ADMINISTRATOR xxxxxx
>
>
> Replace xxxxxx with whatever the password is. Of course, this is visible
> in plain text in the script file so its not very secure. You need to be
> an administrator to run do this, obviously.
>
>
>
> --
>
> This might be a better solution for you...
> http://support.microsoft.com/defaul...kb;EN-US;272530
>
> If you have an account that has admin rights to all machines on the
> network (for example a domain admin account), you can use it remotely.
>



  Reply With Quote
Old 28-10-2004, 02:38 AM   #8
WhiteZin2000
Guest
 
Posts: n/a
Default Re: Change local Admin password thourgh a .reg file

I have accomplished this using a Visual Basic script, pushed out through SMS
2003. In this capacity, we can change the Local Administrator account
password for all of our 1000+ PC/laptops without the user even knowing.
Also, SMS will show us the status of which systems the VB script has
executed on.

We've found that this is MUCH easier than trying to keep the local admin
account password a 'secret' - as secrets always seem to be discovered. I
suppost you could use the VB script without SMS, but the trick would be how
to execute it without user intervention. The particular script we use
requires Administrator rights (which we overcome via SMS2003). We had to
tweak the script to meet or needs - but it works well

Search the internet for something like 'change password + VB script' and
you'll likely stumble across a few possible scripts.

Goodluck!

"hustedj" <asdf@asd.com> wrote in message
news:g82dnf49PcLXsB3cRVn-hw@comcast.com...
>I would like to create a .reg file that when you click on it, it will
>change the local admin password to what I want it to be. Is this possible?
>
> Thanks
>



  Reply With Quote
Old 28-10-2004, 06:18 PM   #9
Torgeir Bakken \(MVP\)
Guest
 
Posts: n/a
Default Re: Change local Admin password thourgh a .reg file

WhiteZin2000 wrote:

> I have accomplished this using a Visual Basic script, pushed out through SMS
> 2003. In this capacity, we can change the Local Administrator account
> password for all of our 1000+ PC/laptops without the user even knowing.
> Also, SMS will show us the status of which systems the VB script has
> executed on.
>
> We've found that this is MUCH easier than trying to keep the local admin
> account password a 'secret' - as secrets always seem to be discovered. I
> suppost you could use the VB script without SMS, but the trick would be how
> to execute it without user intervention. The particular script we use
> requires Administrator rights (which we overcome via SMS2003). We had to
> tweak the script to meet or needs - but it works well

Hi

As long as you have Active Directory, you don't need SMS for this:

You could do it in a computer startup script (with a GPO) that runs
as part of the boot up process (before the user logs in). It runs
under the system context and has admin rights.


To avoid users being able to read the script where the password is
stored, grant read access only for the AD group "Domain Computers"
to the script file.


As long as the Administrator account name is "Administrator", this
batch file will set the password on the account:

'--------------------8<----------------------
@echo off
net.exe user administrator newpassword
'--------------------8<----------------------


As long as the Administrator account name is "Administrator", this
vbscript will set the password on the account:

'--------------------8<----------------------
sNewPassword = "testpassword"
Set oWshNet = CreateObject("WScript.Network")
sComputer = oWshNet.ComputerName

On Error Resume Next
Set oUser = GetObject("WinNT://" & sComputer & "/Administrator,user")
oUser.SetPassword sNewPassword
oUser.SetInfo
On Error Goto 0
'--------------------8<----------------------


If you want to change the password instead of setting it (but this
means you will need to be sure that you know the old password on
all the computers), use oUser.ChangePassword instead of
oUser.SetPassword, like this:

oUser.ChangePassword "old pwd here", sNewPassword



If there is a chance that the name of the administrator is not
"Administrator" (e.g. the account is renamed, or you have some
non-English OS versions), you could use this version instead:

'--------------------8<----------------------
sNewPassword = "testpassword"
Set oWshNet = CreateObject("WScript.Network")
sComputer = oWshNet.ComputerName
sAdminName = GetAdministratorName

On Error Resume Next
Set oUser = GetObject("WinNT://" & sComputer & "/" & sAdminName & ",user")
oUser.SetPassword sNewPassword
oUser.SetInfo
On Error Goto 0


Function GetAdministratorName()

Dim sUserSID, oWshNetwork, oUserAccount

Set oWshNetwork = CreateObject("WScript.Network")
Set oUserAccounts = GetObject( _
"winmgmts://" & oWshNetwork.ComputerName & "/root/cimv2") _
.ExecQuery("Select Name, SID from Win32_UserAccount" _
& " WHERE Domain = '" & oWshNetwork.ComputerName & "'")

On Error Resume Next
For Each oUserAccount In oUserAccounts
If Left(oUserAccount.SID, 9) = "S-1-5-21-" And _
Right(oUserAccount.SID, 4) = "-500" Then
GetAdministratorName = oUserAccount.Name
Exit For
End if
Next
End Function
'--------------------8<----------------------






--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/sc...er/default.mspx
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off