Announcement

Collapse
No announcement yet.

Adding a new local user to multiple computers

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

  • Adding a new local user to multiple computers

    I am needing to create a new local user for all our Windows XP machines. I can seletect them in the object browser, how can I add the user to them?

    Thanks!

  • #2
    Re: Adding a new local user to multiple computers

    You won't be able to do this in Hyena. You should be able to create a batch file using addusers.exe for this, though.

    Comment


    • #3
      Re: Adding a new local user to multiple computers

      Smatt,

      Is this in an NT or Active Directory environment?

      Scripting this would also be an option.
      (Taken from MS SA Scripting guide)
      In an AD environment:
      Description
      Creates a user account in Active Directory. This script only creates the account, it does not enable it.

      Script Code

      Set objOU = GetObject("LDAP://OU=management,dc=fabrikam,dc=com")
      Set objUser = objOU.Create("User", "cn=MyerKen")
      objUser.Put "sAMAccountName", "myerken"
      objUser.SetInfo

      To Enable it:
      Description
      Enables a user account.

      Script Code

      Set objUser = GetObject _
      ("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")
      objUser.AccountDisabled = FALSE
      objUser.SetInfo

      (The System Administration Scripting Guide, part of the Windows .NET Server Resource Kit. For more information, contact [email protected].)

      In an NT environment:
      (taken from: http://www.microsoft.com/technet/tre...er/ScrUG92.asp)

      Description
      Creates a local user account (Admin2) on a computer named MyComputer, and sets the password for the account to sA2xpWh.

      strComputer = "MyComputer"
      Set colAccounts = GetObject("WinNT://" & strComputer & ",computer")
      Set objUser = colAccounts.Create("user", "Admin2")
      objUser.SetPassword "sA2xpWh"
      objUser.SetInfo

      Obviously, these scripts would need to be "tweaked" to allow you to select multiple systems and apply the tool, but at least you have the basics now.

      Hope this helps!

      Joel

      Comment

      Working...
      X