chrno2004 Posted October 24, 2004 Posted October 24, 2004 - Changes Admin/Guest name- Deletes ASP,Support,Help users- Disable Guest I use this vbs for our network installations Just edit the the CAPS sectionOn Error Resume NextstrComputer = "."strCompPass = "SETYOURPASSWORDHERE"strRemoveHA = "HelpAssistant"strRemoveSup = "SUPPORT_388945a0"strRemoveAdmin = "Administrator"strRemoveASPNet = "ASPNET"Set WshShell = WScript.CreateObject("WScript.Shell")Set WshNetwork = WScript.CreateObject("WScript.Network")Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\default:StdRegProv")strComputer = WshNetwork.ComputerName'Renaming Administrator accountSet oMachine = GetObject("WinNT://" & strComputer)Set oInfoUser = GetObject("WinNT://" & strComputer & "/Administrator,user")set oUser = oMachine.MoveHere(oInfoUser.ADsPath,"NEWADMINNAME")'Reseting Administrator PasswordSet objUser = GetObject("WinNT://" & strComputer & "/NEWADMINNAME, user")objUser.SetPassword "SETYOURPASSWORDHERE"objUser.SetInfo'Renaming GuestSet oMachine = GetObject("WinNT://" & strComputer)Set oInfoUser = GetObject("WinNT://" & strComputer & "/Guest,user")set oUser = oMachine.MoveHere(oInfoUser.ADsPath, "NoGuest")'Reseting Guest PasswordSet objUser = GetObject("WinNT://" & strComputer & "/NoAccess, user")objUser.SetPassword "SETYOURPASSWORDHERE"objUser.SetInfo'Disabling Guest AccountSet objUser = GetObject("WinNT://" & strComputer & "/NoAccess")objUser.AccountDisabled = TrueobjUser.SetInfo'Deleting Help Assistant Account, Support Account, ASPNET AccountSet objComputer = GetObject("WinNT://" & strComputer & "")objComputer.Delete "user", strRemoveHAobjComputer.Delete "user", strRemoveSupobjComputer.Delete "user", strRemoveASPNet
Guest a1ehouse Posted October 24, 2004 Posted October 24, 2004 Nice script chrno2004. I have tweaked it slightly for ease of use, plus I think there was something wrong with the guest part:should "/NoAccess" be "/NoGuest"?On Error Resume NextstrComputer = "."strCompPass = "SETYOURPASSWORDHERE"strNewAdminName = "SETYOURNEWADMINNAME"strNewGuestName = "SETYOURNEWGUESTNAME"strRemoveHA = "HelpAssistant"strRemoveSup = "SUPPORT_388945a0"strRemoveAdmin = "Administrator"strRemoveASPNet = "ASPNET"Set WshShell = WScript.CreateObject("WScript.Shell")Set WshNetwork = WScript.CreateObject("WScript.Network")Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\default:StdRegProv")strComputer = WshNetwork.ComputerName'Renaming Administrator accountSet oMachine = GetObject("WinNT://" & strComputer)Set oInfoUser = GetObject("WinNT://" & strComputer & "/Administrator,user")set oUser = oMachine.MoveHere(oInfoUser.ADsPath, strNewAdminName)'Reseting Administrator PasswordSet objUser = GetObject("WinNT://" & strComputer & "/" & strNewAdminName & ", user")objUser.SetPassword strCompPassobjUser.SetInfo'Renaming GuestSet oMachine = GetObject("WinNT://" & strComputer)Set oInfoUser = GetObject("WinNT://" & strComputer & "/Guest,user")set oUser = oMachine.MoveHere(oInfoUser.ADsPath, strNewGuestName)'Reseting Guest PasswordSet objUser = GetObject("WinNT://" & strComputer & "/" & strNewGuestName & ", user")objUser.SetPassword strCompPassobjUser.SetInfo'Disabling Guest AccountSet objUser = GetObject("WinNT://" & strComputer & "/" & strNewGuestName)objUser.AccountDisabled = TrueobjUser.SetInfo'Deleting Help Assistant Account, Support Account, ASPNET AccountSet objComputer = GetObject("WinNT://" & strComputer & "")objComputer.Delete "user", strRemoveHAobjComputer.Delete "user", strRemoveSupobjComputer.Delete "user", strRemoveASPNet
UnderTheGun Posted January 19, 2005 Posted January 19, 2005 Nice script. Do you know how to turn the "password never expires" off? That is, so the option is deselected in user manager? Any help would really be appreciated. Thanks.My company wants us to turn it off. Here's their reasoning:Password Expiration.Severity: Important (Cat II)Status : OpenPDI ID : 1745Finding DetailsHelpAssistant password does not expire.SUPPORT_388945a0 password does not expire.xadministrator password does not expire.xguest password does not expire.Vulnerability DiscussionCategory II - Allowing individual users to have passwords that never expire, gives the ability of unauthorized system users to crack passwords and gain access to a system. Scheduled changing of passwords will hinder this ability.Manual Fix ProceduresEnsure that individual users are not setup with the option password never expires.References and Additional ResourcesFSO Checklist: 5.07.1.2NSA NT Guide: Chap. 5, p. 30; NSA WIN2K Guide, Group Policy: SecurityConfiguration Toolset: Chap. 3, p. 22; DODD 8500.1 Para 4.18; DODI 8500.2 DCCS-2,DCSC-1; CJCSM 6510.01 App. A, Enclosure A, Para. 5.b (8)
Yzöwl Posted March 14, 2005 Posted March 14, 2005 I know it sounds a little lame, but every link I have found for RENUSER.EXE is not available.Could someone please find a working link or upload it, thanks.
Fireplay5 Posted March 18, 2005 Posted March 18, 2005 Is there a way to upload files here? I went ahead and put the file for you on my site which you can get it here! I can not say how long I will leave it there so if there is a more permanent solution then please let me know and I will upload it somewhere else. Good luck.
Yzöwl Posted April 13, 2005 Posted April 13, 2005 missed your reply, sorry.But I've just got it now, thanks.
yaroz Posted April 13, 2005 Posted April 13, 2005 I use a program called BuiltIn.exe (I got it from a co-worker that was using it in a kix script). Then, it's just one line, put into a .cmd file..START "" /WAIT "builtin.exe" /newname:LocalAdmin
MyDomain Posted May 16, 2005 Posted May 16, 2005 Well i used RunOnceEx, to run my RenName.cmd...Which contains the following:cmdow @ /HID@echo offecho Renaming Administrator Accountrenuser "Administrator" "My new name"EXITIt does rename the Administrator account, but when it is all done and it's waiting to enter it's password (i have classic login) it still say Administrator. I tryed to log in with My new name, works fine. But in Documents and settings there is a folder named Administrator, wich is the folder containing the info for My new name.I want that to be renamed as well, just as nLite does, but i don't wanna use nLite.With nLite it also fills in the new name automaticly.Hope anyone can help me.Thanks in advance
Yzöwl Posted May 16, 2005 Posted May 16, 2005 renuser.exe works fine at cmdlines.txt, just add the usual details in your winnt.sif then add the following under [Commands], in your cmdlines.txt e.g."renuser.exe Administrator root"where root is the new name chosenFor this to work you just need to put renuser.exe into your $OEM$ directory along side the cmdlines.txtThe other benefit of using renuser.exe at this stage is that the Profile directory name will be e.g. root as opposed to still using one called Administrator
MyDomain Posted May 16, 2005 Posted May 16, 2005 oke thanks, i'll try that!But the usual stuff, you mean you normal unattended awsners? Thanks!
rikgale Posted May 16, 2005 Posted May 16, 2005 Thanx Yzöwl. I know that there is a way to change this in nlite, but this is a useful way to change it without having re-nlite everytime I re-install on a different machine. Just change the cmdline.txt and burn. Cheers!
Yzöwl Posted May 16, 2005 Posted May 16, 2005 oke thanks, i'll try that!But the usual stuff, you mean you normal unattended awsners? I specifically meant AdminPassword if you use one, AutoLogonCount, I'm not sure about, it may not work due to the name change.
rikgale Posted May 17, 2005 Posted May 17, 2005 The autologon part doesn't seem to work with the name change. I've just tried it. Had to change the logon name mannually and then it logged in as normal and installed everything.Anyone any idea of how to get round this?
MyDomain Posted May 17, 2005 Posted May 17, 2005 @Yzöwl or anyone else who knowsWell i tryed it, but it didn't work.i added the following in my cmdlines.txt[COMMANDS]"REGEDIT /S tweaks.reg""Cleanup.cmd""renuser.exe "Administrator" "First Second""I use a space in my name... maybe that is the reason why?If so, what is the proper syntax?Because renaming it without the quates around my name with the space it doesn't rename. I tested this when windows was running.Thanks in advance
rikgale Posted May 17, 2005 Posted May 17, 2005 You may also wish to watch out for the small issue that I have encountered. If you rename the Administrator account and have a cleanup.cmd that deteles short cuts and other such items from your start menu and some of these are Administrator specfic i.e.DEL "%systemdrive%\Documents and Settings\Administrator\Start Menu\Remote Assistance.lnk"Then you will have to change the Administrator part to the new name of your admin account. This is only likely to be a problem if you are going to install this on many differenet computers with different Administraor names.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now