Andries Posted April 26, 2004 Share Posted April 26, 2004 Is it possible that I change the "administrator" name/account (who has automatically created in a unattend file) renamed in "admin"?I must change this after every unattended installation (for exclusive applications) but I would like that automatically if it is possible. Link to comment Share on other sites More sharing options...
rdalling Posted April 26, 2004 Share Posted April 26, 2004 Rename administrator accountComputer Configuration\Windows Settings\Security Settings\Local Policies\Security OptionsDescriptionDetermines whether a different account name will be associated with the security identifier (SID) for the account "Administrator." By associating the Administrator SID with another account, you will no longer have an account named "Adminstrator," which is often a point of attack by hackers. Microsoft Group Policy ReferenceHope that helpsRoger Link to comment Share on other sites More sharing options...
Jotnar Posted April 26, 2004 Share Posted April 26, 2004 (edited) Use something like this for general good practices. Get netuser.exe and renuser.exe, drop the file(s) into the system32 folder however you like (I use $OEM$\$$\System32 during setup) and run a batch file like this from RunOnce:@echo offecho Renaming/Creating Accountsnet user guest {s2J234OPH}renuser guest notguestnet localgroup guests notguest /deleterenuser Administrator adminnet user /add Administrator /active:no /passwordchg:no /passwordreq:yesnetuser Administrator /pwnexp:ynet user Administrator {s2J234OPH}net localgroup users Administrator /deleteThis way it will do this after setup, but before the first user logs in. It will rename the guest account and remove it from the guests group (If you install the .Net framework later it will put it back there FYI). It will also rename the administrators account to soemthing else and create a dummy Administrators account while removing the dummy account from the users group.For what you wanted to do you could use the following from RunOnce (assuming you drop renuser.exe into the system32 folder during install):@echo offecho Renaming Administrator Accountrenuser Administrator adminCheers Edited July 19, 2005 by Jotnar Link to comment Share on other sites More sharing options...
gmx Posted April 26, 2004 Share Posted April 26, 2004 Jotnar thanx a bunch been lookin for this since a while Link to comment Share on other sites More sharing options...
GreenMachine Posted April 27, 2004 Share Posted April 27, 2004 ...netuser Administrator /pwnexp:y...I've been looking for something to do this for a while, with no luck. I can't get this to work either: this switch generates the "help" screen (where it is not listed), and does not check that box. Anyone have it working? Link to comment Share on other sites More sharing options...
Jotnar Posted April 27, 2004 Share Posted April 27, 2004 Strange and unusual...it works in Windows 2000 (which I have at work) but not in XP (which I have at home). Hmmm... It would seem Google is my friend tonight Try the one Here. This one works for me on Windows XP. You would think Microsoft would give you a way to do this through the command line...sighedit...maybe I linked to the wrong netuser.exe before? I could've sworn thats where I downloaded it from last week. Too many **** files named netuser.exe.edit 2...It was the wrong link. They have 2 files called netuser.exe on their site. Original post now fixed.Cheers Link to comment Share on other sites More sharing options...
GreenMachine Posted April 27, 2004 Share Posted April 27, 2004 Cool! They both look like good tools, but are not at all the same. Thanks! Link to comment Share on other sites More sharing options...
Andries Posted April 27, 2004 Author Share Posted April 27, 2004 Thanks!I worked with Windows XP and it's working.everybody, thanks! Link to comment Share on other sites More sharing options...
Denney Posted April 27, 2004 Share Posted April 27, 2004 Woot! This will help with me heaps. I hate having to rename the admin and guest accounts every time I install (kinda defeats my unattended idea).Again, thanks.Edit: One question, can you rename the administrator and guest accounts at the T-12 minute mark via RunOnceEx or MUST this be done from RunOnce just before user login? Link to comment Share on other sites More sharing options...
enuffsaid Posted April 27, 2004 Share Posted April 27, 2004 removed Link to comment Share on other sites More sharing options...
Jotnar Posted April 27, 2004 Share Posted April 27, 2004 @RaveRodI honestly don't know. I was playing it safe since i'm not quite sure when those accounts get created.@enuffsaidyour welcome!Cheers Link to comment Share on other sites More sharing options...
Denney Posted April 28, 2004 Share Posted April 28, 2004 Well, I tried it and it worked.One thing though, the new administrator account won't show up on the logon screen (just like if you happen to add another account). To rectify this, you must import the registry tweak to show the administrator account on the logon screen with cmdlines.txt.The guest account was renamed, the guests group was removed and the administrator account was renamed. Worked fine without a hitch. Thanks again for this find.Edit: For reference, here is the UserSetup.cmd file I used (this file can be added to the cmdlines.txt file):@echo off %systemdrive%\MSA\Utilities\renuser.exe guest disablednet localgroup guests disabled /delete set /P newadmin="Enter a new administrator name: "%systemdrive%\MSA\Utilities\renuser.exe administrator %newadmin% reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v %newadmin% /t REG_DWORD /d 00000001 /fChange the paths to renuser.exe ofcourse. Link to comment Share on other sites More sharing options...
Denney Posted April 28, 2004 Share Posted April 28, 2004 Edit2: Here's one for ya, if you add that registry tweak from cmdlines.txt, the username won't show up on the Welcome Screen until you reboot, twice! That's what I've had to do on my 4 test using VMWare. Can anyone shed some light on that problem? Link to comment Share on other sites More sharing options...
Andries Posted May 4, 2004 Author Share Posted May 4, 2004 whoops another problem. Could you tell me how I can delete the relation "user"I have create a account with the name "general"Windows XP created automatic a relation with "Users"But I would delete this relation and will create a relation with "Administrors"How can I do that? Link to comment Share on other sites More sharing options...
enuffsaid Posted May 4, 2004 Share Posted May 4, 2004 Do you mean that the account you create is added to the "Users" group?Try this script:Dim UM:Set UM = CreateObject("UserManager.Server") 'Add Guest user account to a 'Users' local groupUM.Users("Guest").AddToLocalGroup "Users" 'Remove account from the groupUM.Users("Guest").RemoveFromLocalGroup "Users"orIf the group is a local group perform the following:net localgroup <group name> <user> /deleteIf the group is part of a domain userC:\> net group <group name> <user> /delete /domainHope that helps...Regards,eNuffSaid Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now