|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Scripting, Local Admin AccountI am new to scripting and I am trying to create a script that will
create a local admin account on 50 machines running windows xp, that are
all in a domain. I would just like to set a general account name, and
pull the password for a txt file that is saved on that machine.
What would be the best way to perform this task? -- ScriptNewBe ------------------------------------------------------------------------ ScriptNewBe's Profile: http://forums.techarena.in/members/84626.htm View this thread: http://forums.techarena.in/server-scripting/1146961.htmhttp://forums.techarena.in "ScriptNewBe" <ScriptNewBe.3pk3jb@DoNotSpam.com> wrote in message It depends what you mean by "best way". Shortest script? Dependent on native news:ScriptNewBe.3pk3jb@DoNotSpam.com... > > I am new to scripting and I am trying to create a script that will > create a local admin account on 50 machines running windows xp, that are > all in a domain. I would just like to set a general account name, and > pull the password for a txt file that is saved on that machine. > > What would be the best way to perform this task? tools only? Easy to understand for a novice? You could use psexec.exe (www.sysinternals.com) to invoke the following batch file, which you should store in a central location: @echo off set PWFile=c:\AdminPW.txt if not exist %PWFile% goto :eof for /F %%a in (%PWFile%) do set PW=%%a echo net user NewAdmin %PW% /add echo net localgroup Administrators NewAdmin /add Note that storing a local admin's password in a file on the local machine creates an obvious security issue. Much better to store it in a central and protected folder. I would like to use the shortest script and easiest to maintain. Yes, I
know that would be a security risk, I was just using it as a reference
of idea. It will be protected. :)
I will try it out and see how it goes. Thank you. -- ScriptNewBe ------------------------------------------------------------------------ ScriptNewBe's Profile: http://forums.techarena.in/members/84626.htm View this thread: http://forums.techarena.in/server-scripting/1146961.htmhttp://forums.techarena.in "ScriptNewBe" <ScriptNewBe.3pk3jb@DoNotSpam.com> wrote in message I'd recommend against doing it at all. Given the domain, it would be more news:ScriptNewBe.3pk3jb@DoNotSpam.com... > > I am new to scripting and I am trying to create a script that will > create a local admin account on 50 machines running windows xp, that are > all in a domain. I would just like to set a general account name, and > pull the password for a txt file that is saved on that machine. > > What would be the best way to perform this task? manageable and more secure to add AD groups to the local "administrators" group on each machine. /Al Show quoteHide quote > > > -- > ScriptNewBe > ------------------------------------------------------------------------ > ScriptNewBe's Profile: http://forums.techarena.in/members/84626.htm > View this thread: http://forums.techarena.in/server-scripting/1146961.htm > > http://forums.techarena.in >
Schedule Defrag through GPO (non admin)
Access protected folders using system account If syntax for numeric values SBS 2003 VB Scripting - Help Needed! help with logon vbs script Query OU for disabled computers Script AD remove all members groups OU Change Password LDAP query fails... because of parentheses? Script for Thunderbird configuration |
|||||||||||||||||||||||