Jump to content

Recommended Posts

Posted

Hi, I would like to know if there is a way to rename main admin before first logon.

I used to go with the welcome screen, create a user "delete me", log with it, go into user management, rename Administrator for something else (lets say Admin), log off and log as Admin and delete user "delete me". This way, in doc&settings, I have a folder Admin and not Administrator.

Now, I would like to know if there is a way to do so like the net user command used with cmdlines.txt

Tks


Posted

Here's a script I wrote that takes care of all the account chores. It renames both the Administrator and Guest accounts, strips out their descriptions, creates a fake Administrator account that has the description and belongs to the guests group, creates what you want your real admin account to be, and finally, deletes the extra user names that are created by default. One note: The "Debugger Users" group will only exist if you are joining a domain.

Option Explicit
On Error Resume Next
Dim wn, objReg, sysdrv, strComputer, strPath, objComp
Set wn=WScript.CreateObject("WScript.Network")
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\default:StdRegProv")
strComputer=wn.ComputerName
strPath=("WinNT://" & strComputer)
Set objComp=GetObject(strPath)

'**********************************************************************
'** Subroutine; Process the built-in Administrator account           **
'**********************************************************************
Sub ProcessAdmin
Dim objUser1, objUser2, objGroup1, objGroup2, flag
Set objUser1=objComp.GetObject("user","Administrator")
Set objGroup1=objComp.GetObject("group","Debugger Users")
Set objGroup2=objComp.GetObject("group","Guests")
objGroup1.Remove objUser1.AdsPath
objGroup2.Add objUser1.AdsPath
objUser1.SetPassword "password1"
Set objUser2=objComp.MoveHere(objUser1.ADsPath,"Jerry")
objUser2.Description=""
objUser2.SetInfo
If objUser2.AccountDisabled="False" Then flag=objUser2.Get("UserFlags")+2
objUser2.Put "UserFlags", flag
objUser2.SetInfo
End Sub

'**********************************************************************
'** Subroutine; Process the built-in Guest account                   **
'**********************************************************************
Sub ProcessGuest
Dim objUser1, objUser2
Set objUser1=objComp.GetObject("user","Guest")
objUser1.SetPassword "password2"
Set objUser2=objComp.MoveHere(objUser1.AdsPath,"Kramer")
objUser2.Description=""
objUser2.SetInfo
End Sub

'**********************************************************************
'** Subroutine; Create and configure a new Administrator account     **
'**********************************************************************
Sub NewAdmin
Dim objUser, objGroup
Set objUser=objComp.Create("user", "Dave")
Set objGroup=objComp.GetObject("group","Administrators")
objUser.SetPassword "password3"
objUser.FullName="David J. Doe"
objUser.SetInfo
objGroup.Add objUser.AdsPath
End Sub

'**********************************************************************
'** Subroutine; Create and configure a fake Administrator account    **
'**********************************************************************
Sub FakeAdmin
Dim objUser, objGroup, flag
Set objUser=objComp.Create("user", "Administrator")
Set objGroup=objComp.GetObject("group","Guests")
objUser.SetPassword "password4"
objUser.Description="Built-in account for administering the computer/domain"
objUser.FullName=""
objUser.SetInfo
objGroup.Add objUser.AdsPath
If objUser.AccountDisabled="False" Then flag=objUser.Get("UserFlags")+2
objUser.Put "UserFlags", flag
objUser.SetInfo
End Sub

'**********************************************************************
'** Run Tasks                                                        **
'**********************************************************************
ProcessAdmin
ProcessGuest
NewAdmin
FakeAdmin
objComp.Delete "user", "ASPNET"
objComp.Delete "user", "HelpAssistant"
objComp.Delete "user", "SUPPORT_388945a0"

Posted

Just a tip here.. for months I was doing my searches by using the Google search at the top of the web pages. I found that I get MUCH better results using the search box that is at the bottom of the pages that contain the list of threads. I don't know why it took me so long to figure this out, but then again I don't know why that search function isn't placed near the top also instead of at the bottom of the page.

Posted

you can put it @T-13 cmdlines.txt but according to your previous posts you are using autologon so just put the script "RogueSpear" wrote into RunOnce section of your winnt.sif file under [GuiRunOnce]

Posted
Just a tip here..  for months I was doing my searches by using the Google search at the top of the web pages.  I found that I get MUCH better results using the search box that is at the bottom of the pages that contain the list of threads.  I don't know why it took me so long to figure this out, but then again I don't know why that search function isn't placed near the top also instead of at the bottom of the page.

No I'm not using the google search but the forum search, but tks for the advice.

  • 11 months later...
Posted
copy the netuser.exe to system32 folder

and use this command

netuser Administrator /name:ANYNAME

You can search

Did a little search, is this a software you have to pay for?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...