Kaseya Community

Creating a new admin user script

  • I have been trying to find a way to deploy a script so that it creates a Local Administrator account on the pc (server). Thus far i've had no success and was wondering if anyone could help point me in the right direction?

    Many thanks,

    Ryan


    Legacy Forum Name: Creating a new admin user script,
    Legacy Posted By Username: ryan@small-biz.it
  • Create Adminitrator account.txt
    Try this.




    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: raybarber
  • Thanks for this!

    It has created the account but I cannot get it to change the password.

    I changed it in this section:

    Execute Shell Command
    Parameter 1 : net user myadmin mypassword /add
    Parameter 2 : 1
    OS Type : 0

    after changing the myadmin and mypassword to myown, the account appeared in Control Panel/Users, but when I tried to log on to it, the password was incorrect.


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: ryan@small-biz.it
  • hmm... thats strange - i've never had any issue changing the password before, it is just an admin account after all.

    this script creates the user as a 'hidden' user so that if you are using it to create an admin on your customers machnines they won't see it. Maybe this is affecting the way you are trying to change the password.

    How did you try changing the password?


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: raybarber
  • Cool script. However, I noticed that it didn't hide the admin account that it created on my test machines. Any hints?

    Thanks.
    Vince


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: vplaza
  • Doh! Never mind. I found the problem.

    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: vplaza
  • well, I was going to say check that the name in the registry key is the same as the admin name you have created.

    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: raybarber
  • Zactly. Thanks. Should've checked it first before posting the question.

    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: vplaza
  • Hi,

    What changes would need to be made to 1) Never let the account expire & 2) Never change the password. We've ran into patch installs failing after a while due to the local admin password expiring.

    Thanks


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: systemet
  • To set the user account to never expire, you just have to add this to the script as a "execute shell command"

    net user myadmin mypassword /expires:never



    To set password to never change, add this one.

    net user myadmin mypassword /passwordchg:never



    Theres allot more you can do with the net user command, just go to microsoft help and support and search for how to use the net user command


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: mhinnenkamp
  • How is using this script better/worse/different than using the Remote Control/Reset Password/Create New Account/As Administrator function built into Kaseya?

    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: kentschu
  • The main thing that makes this useful as a script is the fact that it can be made a part of a template, so you can automate the roll-out process.

    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: raybarber
  • mhinnenkamp wrote:
    To set the user account to never expire, you just have to add this to the script as a "execute shell command"

    net user myadmin mypassword /expires:never



    To set password to never change, add this one.

    net user myadmin mypassword /passwordchg:never



    Theres allot more you can do with the net user command, just go to microsoft help and support and search for how to use the net user command

    Has anyone got this to work correctly? I can get the commands to run correctly (from the dos prompt as well) but when I go and open the properties of the user the 'password never expires' is still not checked.


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: Coldfirex
  • Great.

    I just upgraded to v4.8 and now I can't even find the integrated function of resetting a local password or creating a new user. Was it removed or just moved?


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: Coldfirex
  • I created my own 'Domain Account' creation script if anyone is interested.

    forgot about the need to HIDE the local accounts, I'll add that to my 'Local Account' script. (made my own)


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: nigel_bca