IPB

Google Frontpage Forums Unattended CD/DVD Guide
 Forum Rules Unattended CD/DVD Guide Homepage · MSFN Forum Rules
4 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> Change administrator name
Andries
post Apr 26 2004, 02:22 AM
Post #1


Newbie


Group: Members
Posts: 36
Joined: 26-April 04
From: The Netherlands
Member No.: 18545



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.
Go to the top of the page
 
+Quote Post
rdalling
post Apr 26 2004, 08:11 AM
Post #2


Member
**

Group: Members
Posts: 151
Joined: 29-March 04
Member No.: 16824



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
Go to the top of the page
 
+Quote Post
Jotnar
post Apr 26 2004, 08:49 AM
Post #3


Member
**

Group: Members
Posts: 178
Joined: 9-January 04
Member No.: 12190



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:

CODE
@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):

CODE
@echo off
echo Renaming Administrator Account
renuser Administrator admin


Cheers

This post has been edited by Jotnar: Jul 19 2005, 07:18 AM
Go to the top of the page
 
+Quote Post
gmx
post Apr 26 2004, 02:47 PM
Post #4


Member
**

Group: Members
Posts: 232
Joined: 9-November 03
Member No.: 9221



Jotnar thanx a bunch been lookin for this since a while
Go to the top of the page
 
+Quote Post
GreenMachine
post Apr 26 2004, 06:09 PM
Post #5


ineXPlicable
Group Icon

Group: Supreme Sponsors
Posts: 3087
Joined: 22-August 03
Member No.: 5995
Country Flag


QUOTE (Jotnar @ Apr 26 2004, 04:49 PM)
...
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?
Go to the top of the page
 
+Quote Post
Jotnar
post Apr 26 2004, 06:57 PM
Post #6


Member
**

Group: Members
Posts: 178
Joined: 9-January 04
Member No.: 12190



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 smile.gif 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
Go to the top of the page
 
+Quote Post
GreenMachine
post Apr 26 2004, 07:33 PM
Post #7


ineXPlicable
Group Icon

Group: Supreme Sponsors
Posts: 3087
Joined: 22-August 03
Member No.: 5995
Country Flag


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

Thanks!
Go to the top of the page
 
+Quote Post
Andries
post Apr 27 2004, 05:29 AM
Post #8


Newbie


Group: Members
Posts: 36
Joined: 26-April 04
From: The Netherlands
Member No.: 18545



Thanks!

I worked with Windows XP and it's working.
everybody, thanks!
Go to the top of the page
 
+Quote Post
Denney
post Apr 27 2004, 05:44 AM
Post #9


*shrug*
*****

Group: Members
Posts: 877
Joined: 11-September 03
From: Brisbane, Australia
Member No.: 6518
Country Flag


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?
Go to the top of the page
 
+Quote Post
enuffsaid
post Apr 27 2004, 06:57 AM
Post #10


Friend of MSFN
*****

Group: Members
Posts: 933
Joined: 26-December 03
Member No.: 11482



removed
Go to the top of the page
 
+Quote Post
Jotnar
post Apr 27 2004, 08:53 AM
Post #11


Member
**

Group: Members
Posts: 178
Joined: 9-January 04
Member No.: 12190



@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
Go to the top of the page
 
+Quote Post
Denney
post Apr 27 2004, 11:57 PM
Post #12


*shrug*
*****

Group: Members
Posts: 877
Joined: 11-September 03
From: Brisbane, Australia
Member No.: 6518
Country Flag


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):

CODE
@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.
Go to the top of the page
 
+Quote Post
Denney
post Apr 28 2004, 03:21 AM
Post #13


*shrug*
*****

Group: Members
Posts: 877
Joined: 11-September 03
From: Brisbane, Australia
Member No.: 6518
Country Flag


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?
Go to the top of the page
 
+Quote Post
Andries
post May 4 2004, 02:44 AM
Post #14


Newbie


Group: Members
Posts: 36
Joined: 26-April 04
From: The Netherlands
Member No.: 18545



whoops another problem.
confused.gif
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?
Go to the top of the page
 
+Quote Post
enuffsaid
post May 4 2004, 07:23 AM
Post #15


Friend of MSFN
*****

Group: Members
Posts: 933
Joined: 26-December 03
Member No.: 11482



Do you mean that the account you create is added to the "Users" group?

Try this script:

CODE
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:
CODE
net localgroup <group name> <user> /delete


If the group is part of a domain user
CODE
C:\> net group <group name> <user> /delete /domain


Hope that helps...
Regards,
eNuffSaid
Go to the top of the page
 
+Quote Post
Andries
post May 6 2004, 02:42 AM
Post #16


Newbie


Group: Members
Posts: 36
Joined: 26-April 04
From: The Netherlands
Member No.: 18545



Yes! Great! It works...

I have got the dutch windows XP PRO version.
And I try to remove "users" but it is "gebruikers" blushing.gif

But It works! Thank you!
Go to the top of the page
 
+Quote Post
Andries
post May 12 2004, 03:57 AM
Post #17


Newbie


Group: Members
Posts: 36
Joined: 26-April 04
From: The Netherlands
Member No.: 18545



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

The password from the administrator is now un-encrypted in the batch file.
CODE
net user Administrator {password}


But is it possible that I make a batchfile with a encrypted password?
Go to the top of the page
 
+Quote Post
Jotnar
post May 12 2004, 01:48 PM
Post #18


Member
**

Group: Members
Posts: 178
Joined: 9-January 04
Member No.: 12190



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
Go to the top of the page
 
+Quote Post
Andries
post May 13 2004, 12:54 AM
Post #19


Newbie


Group: Members
Posts: 36
Joined: 26-April 04
From: The Netherlands
Member No.: 18545



I have already try that!
But if I copy the encrypted text into

CODE
net user administrator "encrypted text"
or
CODE
net user administrator encrypted text
(without quotes)

the Password is wrong.

(I mean, I must type the complete encrypted text and that's not