Post by PaulI've been searching for an answer to this question on & off since last night ...
Is a Windows PC's machine SID (which also forms the user account SIDs up until the final hyphen) cryptographically derived from the installation's Product Key? Or, to put it another way, if I change the product key on a PC, will the user SIDs change as a result, and so require changing the permissions on the user profiles and maybe elsewhere?
I think and hope that the answer is no, but does anyone know for sure?
I want to know this because I've had two old Dell Precision M6300 laptops go down, both through dead video cards - annoying but in their defence they were very old machines - and have replaced them with M6700s. I've just realised that the latter both have W7 Pro OEM product keys on stickers in the battery bay, so that gives me the option of adapting my W7 build for them, and then upgrading them to Win 10 Pro to give me two more licences for the latter. However, as the build I want to adapt is an Ultimate build, I will have to downgrade it by a procedure I've outlined before here when I did it successfully for the Home Premium build for the laptop I'm typing this on. That effort, though it worked pretty well, was rather sledgehammer like, and this time I'd like to try and be at least a little more surgical in my approach, hence the need for the above information.
I don't think there is any reason for the SID scheme to care
about anything around it. It's intended as a self-consistent
scheme for controlling access to files. If you keep "clean installing"
over and over again, the SID root value is going to be different
each time. And yes, this might mean needing implicit Takeown
green-bar to proceed to give you access if you "clean install"
and the SID string changes. If you had a partition called "Data"
for example, and the owner was "Java" 111111111-222222222-333333333-1000
then the next time C: receives a clean install, the current
administrator might be 444444444-555555555-666666666-500 and
the user might be 444444444-555555555-666666666-1002 depending
on the order accounts were added. And that's no longer a match
for 111111111-222222222-333333333-1000 . An implicit Takeown
changes the ownership of Data, to two owners.
111111111-222222222-333333333-1000 <=== OS (new clean install) doesn't know who this is. Not in table.
444444444-555555555-666666666-1002 <=== OS now recognizes this number as "Java". We access "Data" via this one.
But the SID within C: , the files in say System32 are marked
for administrator or SYSTEM or whatever, and the values
line up well enough that the symbolic identifier "administrator"
or administrator group, the OS would still be able to figure
that out. As it is internally consistent with how things
were stamped at install time. But any foreign disks or partitions,
those may be using identifiers from somewhere else, and maybe
only their numerical nature is on display. As the local OS cannot
know the text strings a foreign OS is using.
The behavior might well be different in a Domain, where the authentication
is centralized and the identity of the accounts is sorta "known everywhere
within the domain". That's different than home computing, where the
environment is an "approximation of a domain", and only roughly
looks like there is some order to the chaos. You can have "Java"
account on two machines, but they don't have the same SID numeric value.
And as long as the Java account belongs to Administrator Group,
there's a good chance the machine will just do an implicit Takeown,
which takes some number of seconds to scan the whole tree.
Apologies for not replying sooner, as I was busy doing the job, and
thanks for your detailed comments above. I think I can now absolutely
confirm that the Machine and User SIDs are not cryptographically derived
from the product key or similar, because I've completed this plan
successfully, have compare the User SIDs before and after, and they're
exactly the same, whereas the Product Key has changed. Here's how I
accomplished it ...
NOTE: These instructions were updated from my original method to
downgrade Windows 7 Ultimate to Windows 7 Home Premium, and therefore
refer throughout to Home Premium as the desired destination build, but
in fact on this occasion I was downgrading to Professional, as there are
Product Keys for that on each of the two PCs concerned.
0) Optionally, but advisedly, using an imaging program of your choice,
backup the target Ultimate system disk/partition - which is assumed to
have all device drivers and updates installed and be working, except for
activation, on the intended target PC.
1) On a spare HD in the intended target PC, create a vanilla Home
Premium build with all devices recognised and all updates installed.
2) Mount both the target Ultimate disk (U) and the new Home Premium (H)
disk as extra disks in another working windows system, which for
preference should NOT be the intended target system. To help avoid
confusion, you could give them drive letters U: and H: respectively.
3) If you haven't already on the individual builds when creating them,
you will probably need to select each in turn and give 'Administrators'
ownership throughout each of the two Windows directory heirarchies ...
H:\Windows
U:\Windows
... which you can do from Explorer by <rt-clicking> each in turn, and
choosing Properties, Security, Advanced, Owner, Edit. Probably also you
will have to grant Administrators Full access throughout both
heirarchies by running a command prompt as administrator and giving the
commands ...
icacls H:\Windows\*.* /C /Q /L /T /grant Administrators:F
icacls U:\Windows\*.* /C /Q /L /T /grant Administrators:F
4) Temporarily rename H:\Windows\System32\config to, say, 'configHP'.
5) Going back to the administrator command prompt, copy HP over U by
giving the command ...
xcopy /c /y /b /h /r /e /d H:\Windows\*.* U:\Windows\*.*
... ensure particularly that the branding sub-folder contents have
copied properly. Then remove surplus Ultimate files from U: by ...
for /d /r U:\Windows %A in (*ultimate*.*) do @if not exist "H:%~pnxA"
rd/s/q "%A"
for /r U:\Windows %A in (*ultimate*.*) do @if not exist "H:%~pnxA" del "%A"
... ensuring particularly that ...
"U:\Windows\Ultimate.xml"
... is renamed or deleted.
6) Rename H:\Windows\System32\configHP back to 'config'.
7) On the computer acting as host for these steps, run Regedit.
8) Still in Regedit, select 'HKEY_LOCAL_MACHINE', choose File, Load
hive, and load ...
U:\Windows\System32\configHP\SOFTWARE
(note 'configHP', *NOT* 'config')
... giving a suitable key name for the hive, say, 'U2HP'.
9) Navigate to the following keys, and export each of them saving them
with suitable filenames in somewhere convenient, possibly configHP ...
HKLM\U2HP\Microsoft\Internet Explorer\Registration
HKLM\U2HP\Microsoft\Windows\CurrentVersion\Component Based Servicing
HKLM\U2HP\Microsoft\Windows\CurrentVersion\SideBySide
HKLM\U2HP\Microsoft\WindowsNT
HKLM\U2HP\Wow6432Node\Microsoft\Windows NT\CurrentVersion
... then edit the last two as follows, when done you may have to save
them as ANSI text rather than Unicode to have Registry Editor accept them:
HKLM\U2HP\Microsoft\WindowsNT
Leaving the values in the parent key unchanged, remove all the subkeys
EXCEPT ...
HKLM\U2HP\Microsoft\Windows NT\CurrentVersion\DefaultProductKey
HKLM\U2HP\Wow6432Node\Microsoft\Windows NT\CurrentVersion
Leaving the values in the parent key unchanged, remove all the subkeys.
10) Select HKLM\U2HP and choose File, Unload hive.
11) Repeat step 8 to load the corresponding Ultimate hive from:
U:\Windows\System32\config\SOFTWARE
(it really is 'config' this time)
... being sure to give *exactly* the same key name as above, 'U2HP'
12) Import the registry files saved and edited as above in step 9. For
the Component Based Servicing key, you will have to give Administrators
both Ownership and Full Access of the destination Ultimate key and
replicate this down the sub-heirarchy.
13) Repeat step 10 to unload the hive.
If you are confident of having done everything correctly, delete now, or
else rename and some time in the future delete ...
14) The file (this file must not exist when you next reboot):
U:\Windows\Ultimate.xml
15) The directory:
U:\Windows\System32\spp\tokens\skus\Security-SPP-Component-SKU-Ultimate
16) The directory:
U:\Windows\System32\configHP
17) Eject the two disks from the temporary host system, and load the
Ultimate disk back in its intended target PC.
18) Boot the target PC, which may take significantly longer than usual,
as Windows tries to work out what happened. Quite likely it will slow
to a crawl, restrict usability, and prompt you for authentication as
soon as the log on process completes at the pace of a snail drowning in
treacle, at which point you may authenticate using your Home Premium
disk key, and then restart to regain full functionality.
--
Fake news kills!
I may be contacted via the contact address given on my website:
www.macfh.co.uk