Change administrator name
#1
Posted 26 April 2004 - 02:22 AM
I must change this after every unattended installation (for exclusive applications) but I would like that automatically if it is possible.
#2
Posted 26 April 2004 - 08:11 AM
Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options
Description
Determines 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 Reference
Hope that helps
Roger
#3
Posted 26 April 2004 - 08:49 AM
@echo off
echo Renaming/Creating Accounts
net user guest {s2J234OPH}
renuser guest notguest
net localgroup guests notguest /delete
renuser Administrator admin
net user /add Administrator /active:no /passwordchg:no /passwordreq:yes
netuser Administrator /pwnexp:y
net user Administrator {s2J234OPH}
net localgroup users Administrator /delete
This 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 off echo Renaming Administrator Account renuser Administrator admin
Cheers
This post has been edited by Jotnar: 19 July 2005 - 07:18 AM
#4
Posted 26 April 2004 - 02:47 PM
#5
Posted 26 April 2004 - 06:09 PM
Jotnar, on Apr 26 2004, 04:49 PM, said:
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?
#6
Posted 26 April 2004 - 06:57 PM
edit...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
#7
Posted 26 April 2004 - 07:33 PM
Thanks!
#8
Posted 27 April 2004 - 05:29 AM
I worked with Windows XP and it's working.
everybody, thanks!
#9
Posted 27 April 2004 - 05:44 AM
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?
#11
Posted 27 April 2004 - 08:53 AM
I honestly don't know. I was playing it safe since i'm not quite sure when those accounts get created.
@enuffsaid
your welcome!
Cheers
#12
Posted 27 April 2004 - 11:57 PM
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 disabled net 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 /f
Change the paths to renuser.exe ofcourse.
#13
Posted 28 April 2004 - 03:21 AM
#14
Posted 04 May 2004 - 02:44 AM
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?
#15
Posted 04 May 2004 - 07:23 AM
Try this script:
Dim UM:Set UM = CreateObject("UserManager.Server")
'Add Guest user account to a 'Users' local group
UM.Users("Guest").AddToLocalGroup "Users"
'Remove account from the group
UM.Users("Guest").RemoveFromLocalGroup "Users"
or
If the group is a local group perform the following:
net localgroup <group name> <user> /delete
If the group is part of a domain user
C:\> net group <group name> <user> /delete /domain
Hope that helps...
Regards,
eNuffSaid
#16
Posted 06 May 2004 - 02:42 AM
I have got the dutch windows XP PRO version.
And I try to remove "users" but it is "gebruikers"
But It works! Thank you!
#17
Posted 12 May 2004 - 03:57 AM
The password from the administrator is now un-encrypted in the batch file.
net user Administrator {password}
But is it possible that I make a batchfile with a encrypted password?
#18
Posted 12 May 2004 - 01:48 PM
Cheers
#19
Posted 13 May 2004 - 12:54 AM
But if I copy the encrypted text into
net user administrator "encrypted text"or
net user administrator encrypted text(without quotes)
the Password is wrong.
(I mean, I must type the complete encrypted text and that's not my hobby)
#20
Posted 13 May 2004 - 06:48 AM
Cheers
- ← what is can SLDcodecpack1.5.exe switch
- Unattended Windows 2000/XP/2003
- Windows 2003: My Comp, IE, Network Places Dekstop Icons? →



Help

Back to top









