Lost profile when domain name changes

633 views
Skip to first unread message

Josh Gard

unread,
Jan 8, 2003, 4:57:57 PM1/8/03
to
I would like to find out how to prepare a network of
Windows 2000 Pro (and XP Pro) workstations so that when we
upgrade our NT Server domain to a Win2000 Active
Directory, my users don't lose their local profiles.
Everything I have tried in my test environment has
resulted in the current profile of a user becoming an
Unknown Profile. The only profile to remain unchanged is
the local Administrator. For example, my Win2k
workstations might have several profiles set up, called
OldDomain\User Name. When I upgrade the server to 2000
and configure Active Directory with a new domain name, the
only way to get my workstations to recognize the new
domain is to change the workstation to workgroup mode,
reboot, and then add it back to the new domain, which
results in the creation of new user accounts called
NewDomain\User Name. Unfortunately, the old profiles are
inaccessable and are listed as Unknown User Account. How
can I prepare the machines, or the server, so that either
I keep the same domain name, or migrate the profiles, etc.?

Thanks for any help. You can reply directly to me if you
wish.

Josh J. Gard
Network Administrator
jo...@commd.biz

Danny Sanders

unread,
Jan 8, 2003, 5:06:20 PM1/8/03
to
Method 1 migrates your local profile into the location of your domain
profile:

After logging into your domain profile,logout immediately. Log in again to
your local account, not the domain account. Your profile should load as
usual. Go to: 'Start >> Settings >> Control Panel >> System' and then select
the 'User Profiles' tab. Browse or enter: %systemdrive%\Documents and
Settings\domain profile folder. [domain name]

Click 'OK' and select 'Permitted to Use'. Enter or select your Active
Directory account: domain/username, and not the account local to your
machine. Click 'OK'. This could take a while depending on the size of your
profile.

Reinstall or repair Office 2000 to fix the icons which are damaged in this
process, or recreate the Office shortcuts from scratch. This is the only
downside to this migration process.

When complete, logout and login to your domain account. Your profile should
be back with a.

***** Mozilla and Netscape 6/7 profiles will still point to your old local
Win2k profile directory. This is actually a decent behavior if you ever
waffle between profiles. Do not try to copy the Mozilla/Netscape folders to
your new domain profile; they will not migrate well.

Method 2 points your new domain SID to look to the location of your old
local profile. Obtain the SID of your new domain account by using the Win2k
Resource Kit utility 'getsid'. i.e.:

c:\getsid \localhost [username] \domaincontroller [username]

Using regedit, drill down to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList and find the SID of your domain account.
Change the ProfileImagePath to point to your local profile.

Instead of %SystemDrive%\Documents and Settings\(Username.domain) change
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList\ProfileImagePath to the location of your old
local profile.

%SystemDrive%\Documents and Settings\username

When you next login to your domain account, your profile should be loaded.

hth

DDS W 2k MVP MCSE


"Josh Gard" <jo...@commd.biz> wrote in message
news:211f01c2b761$00aeed90$8af82ecf@TK2MSFTNGXA03...

Torgeir Bakken (MVP)

unread,
Jan 8, 2003, 8:02:32 PM1/8/03
to
Danny Sanders wrote:

> Method 2 points your new domain SID to look to the location of your old
> local profile. Obtain the SID of your new domain account by using the Win2k
> Resource Kit utility 'getsid'. i.e.:
>
> c:\getsid \localhost [username] \domaincontroller [username]

You can use my vbscript function GetUserSID further down as well.


> Using regedit, drill down to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> NT\CurrentVersion\ProfileList and find the SID of your domain account.
> Change the ProfileImagePath to point to your local profile.
>
> Instead of %SystemDrive%\Documents and Settings\(Username.domain) change
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> NT\CurrentVersion\ProfileList\ProfileImagePath to the location of your old
> local profile.
>
> %SystemDrive%\Documents and Settings\username
>
> When you next login to your domain account, your profile should be loaded.

If the users aren't local admins, you might need to set some NTFS rights also
(our users are local admins, so we never have a rights problem)?

We use this method 2, but we have automated the process with a vbscript that
first runs on the old profile to get the profile path to the old user and saves
this to a temp value in registry, then the script switches the computer to the
new domain. Part 2 of the script runs at next logon (Run in registry), when it
detects that the current user is a member of the new domain, it picks up the
profile path for the "old" user from the temp registry value and updates the
ProfileImagePath for the current user. It then forces a reboot so the updated
profile path "kicks in" at once.

You can get the user SID with a vbscript:


WScript.Echo GetUserSID

Function GetUserSID()
' Author: Torgeir Bakken

Dim sUserSID, oWshNetwork, oUserAccount, aRegKeys
Dim sHKLMProfList, i, sUserProfPath, sCurrUsrPath
sUserSID = ""

On Error Resume Next
Set oWshNetwork = CreateObject("WScript.Network")
Set oUserAccount=GetObject( _
"winmgmts://" & oWshNetwork.UserDomain & "/root/cimv2") _
.Get("Win32_UserAccount.Domain='" & oWshNetwork.ComputerName & "'" _
& ",Name='" & oWshNetwork.UserName & "'")

sUserSID = oUserAccount.SID
On Error Goto 0

' if the WMI way failed
If sUserSID = "" Then
sCurrUsrPath = Lcase(oShell.ExpandEnvironmentStrings("%UserProfile%"))
sHKLMProfList = _
"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"

aRegKeys = oCPPLib.EnumRegistryKey(sHKLMProfList)
For i = 0 To UBound(aRegKeys)
sUserProfPath = oWshLib.RegRead(sHKLMProfList & "\" & aRegKeys(i) _
& "\" & "ProfileImagePath")
sUserProfPath = Lcase(oShell.ExpandEnvironmentStrings(sUserProfPath))
If sCurrUsrPath = sUserProfPath Then
sUserSID = aRegKeys(i)
Exit For
End If
Next
End If

GetUserSID = sUserSID
End Function


--
torgeir
Microsoft MVP Scripting and WMI
Porsgrunn Norway


Reply all
Reply to author
Forward
0 new messages