MSFN Forum: Change administrator name - MSFN Forum

Jump to content


  • 4 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Change administrator name Rate Topic: -----

#1 User is offline   Andries 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 26-April 04

Posted 26 April 2004 - 02:22 AM

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.


#2 User is offline   rdalling 

  • Member
  • PipPip
  • Group: Members
  • Posts: 152
  • Joined: 29-March 04

Posted 26 April 2004 - 08:11 AM

Rename administrator account
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 User is offline   Jotnar 

  • Member
  • PipPip
  • Group: Members
  • Posts: 186
  • Joined: 09-January 04

Posted 26 April 2004 - 08:49 AM

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 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 User is offline   gmx 

  • Member
  • PipPip
  • Group: Members
  • Posts: 171
  • Joined: 09-November 03

Posted 26 April 2004 - 02:47 PM

Jotnar thanx a bunch been lookin for this since a while

#5 User is offline   GreenMachine 

  • ineXPlicable
  • Group: Developers
  • Posts: 3,062
  • Joined: 22-August 03

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 User is offline   Jotnar 

  • Member
  • PipPip
  • Group: Members
  • Posts: 186
  • Joined: 09-January 04

Posted 26 April 2004 - 06:57 PM

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...sigh

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 User is offline   GreenMachine 

  • ineXPlicable
  • Group: Developers
  • Posts: 3,062
  • Joined: 22-August 03

Posted 26 April 2004 - 07:33 PM

Cool! They both look like good tools, but are not at all the same.

Thanks!

#8 User is offline   Andries 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 26-April 04

Posted 27 April 2004 - 05:29 AM

Thanks!

I worked with Windows XP and it's working.
everybody, thanks!

#9 User is offline   Denney 

  • *shrug*
  • PipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 11-September 03

Posted 27 April 2004 - 05:44 AM

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?

#10 User is offline   enuffsaid 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 865
  • Joined: 26-December 03

Posted 27 April 2004 - 06:57 AM

removed

#11 User is offline   Jotnar 

  • Member
  • PipPip
  • Group: Members
  • Posts: 186
  • Joined: 09-January 04

Posted 27 April 2004 - 08:53 AM

@RaveRod

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 User is offline   Denney 

  • *shrug*
  • PipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 11-September 03

Posted 27 April 2004 - 11:57 PM

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 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 User is offline   Denney 

  • *shrug*
  • PipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 11-September 03

Posted 28 April 2004 - 03:21 AM

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?

#14 User is offline   Andries 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 26-April 04

Posted 04 May 2004 - 02:44 AM

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?

#15 User is offline   enuffsaid 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 865
  • Joined: 26-December 03

Posted 04 May 2004 - 07:23 AM

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 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 User is offline   Andries 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 26-April 04

Posted 06 May 2004 - 02:42 AM

Yes! Great! It works...

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 User is offline   Andries 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 26-April 04

Posted 12 May 2004 - 03:57 AM

ehhh.... the followed problem do I no have:

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 User is offline   Jotnar 

  • Member
  • PipPip
  • Group: Members
  • Posts: 186
  • Joined: 09-January 04

Posted 12 May 2004 - 01:48 PM

Well...if you're talking about the real administrator account you can have that encrypted in your answer file (winnt.sif) by using setupmgr.exe (Located on your XP disc in \SUPPORT\TOOLS\DEPLOY.CAB). This way you don't have to set the administrator password in a batch file in plain text.

Cheers

#19 User is offline   Andries 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 26-April 04

Posted 13 May 2004 - 12:54 AM

I have already try that!
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 User is offline   Jotnar 

  • Member
  • PipPip
  • Group: Members
  • Posts: 186
  • Joined: 09-January 04

Posted 13 May 2004 - 06:48 AM

If you already have it in the answer file why are you changing the password in a batch file? The encrypted password will only work in the answer file (winnt.sif) during setup. Just set that password to what you want then and you shouldn't have to change it later.

Cheers

Share this topic:


  • 4 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy