Slashdot Mirror


The Machine SID Duplication Myth

toppings writes "Microsoft Technical fellow Mark Russinovich explains why he is now retiring NewSID, which has been used by IT departments for years when deploying Windows to new systems from customized clone images. Russinovich writes: 'The reason that I began considering NewSID for retirement is that, although people generally reported success with it on Windows Vista, I hadn't fully tested it myself and I got occasional reports that some Windows component would fail after NewSID was used. When I set out to look into the reports I took a step back to understand how duplicate SIDs could cause problems, a belief that I had taken on faith like everyone else. The more I thought about it, the more I became convinced that machine SID duplication — having multiple computers with the same machine SID — doesn't pose any problem, security or otherwise. I took my conclusion to the Windows security and deployment teams and no one could come up with a scenario where two systems with the same machine SID, whether in a Workgroup or a Domain, would cause an issue. At that point the decision to retire NewSID became obvious.' He concludes: 'It's a little surprising that the SID duplication issue has gone unquestioned for so long, but everyone has assumed that someone else knew exactly why it was a problem. To my chagrin, NewSID has never really done anything useful and there's no reason to miss it now that it's retired. Microsoft's official policy on SID duplication will also now change and look for Sysprep to be updated in the future to skip SID generation.'"

48 of 201 comments (clear)

  1. fp by Anonymous Coward · · Score: 4, Funny

    Maybe slashdot should get rid of the dupe sids, too.

  2. Except for Domain Controllers.. by tensop · · Score: 2, Informative

    I found that unless you change the SID on a computer before becoming a (virtual or otherwise) windows Domain Controller, it will cause all sorts of issues. That is, at least in windows 2000 and 2003.

    1. Re:Except for Domain Controllers.. by rfunches · · Score: 2, Informative

      Agreed...when I was reading up for one of the Server 2008 AD MCTS exams, I cloned a base VM image of Server 2008 to simulate two DCs, a file server, an IIS/application server, etc. I had to download and run NewSID because every server I joined to the domain (i.e. the "primary" DC) had problems getting joined correctly. I don't recall the specifics but Server 2008 did throw a hissy fit and I had to run NewSID on each VM prior to joining before I could do anything else.

    2. Re:Except for Domain Controllers.. by mysidia · · Score: 5, Informative

      It's not for domain controllers in general it's for the very first domain controller used to initialize a brand new domain. You want to never create a new server with that same SID again. The first domain controller's SID is special, it will be used to generate the domain SID. From then on, all subsequent domain controllers promoted in the domain will have the same machine SID.

      So you're good if you create the very first DC with a unique install, and clone all your other servers from an image.

      As I said earlier, there’s one exception to rule, and that’s DCs themselves. Every Domain has a unique Domain SID that’s randomly generated by Domain setup, and all machine SIDs for the Domain’s DCs match the Domain SID. So in some sense, that’s a case where machine SIDs do get referenced by other computers. That means that Domain member computers cannot have the same machine SID as that of the DCs and therefore Domain. However, like member computers, each DC also has a computer account in the Domain, and that’s the identity they have when they authenticate to remote systems. All accounts in a Domain, including computers, users and security groups, have SIDs that are based on the Domain SID in the same way local account SIDs are based on the machine SID, but the two are unrelated.

      ...

      issue is if a distributed application used machine SIDs to uniquely identify computers. No Microsoft software does so and using the machine SID in that way doesn’t work just for the fact that all DC’s have the same machine SID.

  3. Well... it WAS a problem... by flydpnkrtn · · Score: 2, Insightful

    I know for a fact that WSUS (Windows Server Update Services... basically a centralized patch server) would do "weird, interesting" things when two machines tried to check into WSUS with the same SID. Not sure if they've resolved the problem in later versions of WSUS...see this thread for an example: http://www.neowin.net/forum/lofiversion/index.php/t343182.html

    I thought that the problem was defined as being based around locking a specific machine down with Group Policy... when two machines have the same SID, AD had a hard time distinguishing them for security reasons, much as if two users' SIDs collided...

    But who am I to question the great creator of psexec and psinfo, Lord Russinovich :-)

    1. Re:Well... it WAS a problem... by ErMaC · · Score: 3, Interesting

      There are several other software packages with a similar problem. Microsoft SMS is a big one, as well as most McAfee Enterprise Virus scan products.
      I think Mark's saying this to conveniently avoid updating his software to work with Windows Vista/Windows 7 =)

      --
      "I want to get more into theory, because everything works in theory." -John Cash
    2. Re:Well... it WAS a problem... by flydpnkrtn · · Score: 2, Funny

      I got that impression from the post as well.. "Umm I haven't tested it with NT 6.0 er Vista, and I don't really feel like testing it with NT 6.1 er 'Windows 7,' so we're just gonna retire the thing..."

    3. Re:Well... it WAS a problem... by fan+of+lem · · Score: 5, Informative

      Did you mean the SusClientId? AFAIK this is the only identifier WSUS uses to distinguish between computers (they also don't have to be on the same domain).

      On new clones you only need to delete the SusClientId key under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate; the update service will take care of assigning the machine a new ID.

    4. Re:Well... it WAS a problem... by Anonymous Coward · · Score: 2, Informative

      It is a common misconception that duplicate SIDs create the issue where multiple PCs check in as the same PC (with a rolling name) in WSUS. The WSUS ID is in fact stored here: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate]

      as the SusClientId and SusClientIdValidation keys.

      It can and should be reset independently of SIDs to have PCs correctly check-in to WSUS

    5. Re:Well... it WAS a problem... by pyite · · Score: 3, Interesting

      I know for a fact that WSUS (Windows Server Update Services... basically a centralized patch server) would do "weird, interesting" things when two machines tried to check into WSUS with the same SID.

      I don't even work with Windows servers and I happen to know this from engineering some network infrastructure (load balancing) for the folks in our organization who do manage WSUS. Long story short, what they thought was problematic load balancing across WSUS servers was actually the same SID being used from 1,000+ cloned VMs. WSUS thought they were one machine.

      --

      "Nature doesn't care how smart you are. You can still be wrong." - Richard Feynman

    6. Re:Well... it WAS a problem... by gslavik · · Score: 2, Informative

      Add Sophos enterprise to that list.

    7. Re:Well... it WAS a problem... by gotpaint32 · · Score: 2, Informative

      As fan of lem mentions, the issue you state only happens if the wsus regkey is present. The regkey can only be present if you image a machine that has registered with WSUS. Best practice is to make sure that the machines that you image does not have any group policies applied to it.

      --
      Nuclear war would really set back cable. - Ted Turner
    8. Re:Well... it WAS a problem... by nabsltd · · Score: 4, Informative

      This is absolutely correct.

      Identical machine SIDs and WSUS identifiers (stored in the registry) don't stop the updates from being applied...they just cause the WSUS reports to show only the details for the last cloned machine that connected.

    9. Re:Well... it WAS a problem... by Some+Bitch · · Score: 2

      Oh good. So if Machine A fails to apply a patch for whatever reason and machine B comes along 5 minutes later with exactly the same SID but gets on fine.... you'll never know about machine A?

      No. If Machine A fails to apply a patch for whatever reason and machine B comes along 5 minutes later with exactly the same WSUS ID but gets on fine you'll never know about machine A. WSUS ID and SID are not the same thing. Failure to properly sysprep your image (or at least manually delete the key) is what causes the issues people are describing, nothing to do with the SID whatsoever.

    10. Re:Well... it WAS a problem... by Darth_brooks · · Score: 4, Informative

      I ran into this same issue. I've now got a batch script that runs at first logon (post-reimaging) that resets the client ID. Probably overkill at this point (the bad image that was causing this has long since been redone), but it ensure that every machine checks in with a fresh key.

      net stop wuauserv
      reg delete "HKEY_LOCALMACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Windowsupdate" /v SusClientId /f
      net start wuauserv
      wuauclt.exe /resetauthorization /detectnow

      That does require a more windows update client (the old wuauclt only accepted a couple of options, including detectnow, and ignored the reset. If you typed wuauclt.exe /gogetmeabeerandasteak it wouldn't throw an error, it just looked like it ran).

      There's a distinct difference between the SID and the SusClientID.

      --
      There are some people that if they don't know, you can't tell 'em.
  4. Go Figure by Anonymous Coward · · Score: 5, Insightful

    This is coming from the same company that billed my employer to the tune of $250,000 USD in order to create a utility that would move a user profile from the old location to the new one after the user account had been moved to a new NT domain.

    And then we found the moveuser.exe utility on the server resource kit and asked them what the $250,000 was for. Not that anyone who pays two hundred and fifty thousand dollars for a few lines of vbscript is smart (the phbs wanted something bonafide), but I'm just sayin'...

  5. 42 by Anonymous Coward · · Score: 2, Insightful

    So if SIDs are mostly irrelevant, why bother with them at all? Why not just always have them the same number (e.g., 42)?

  6. Duplicate UIDs by l2718 · · Score: 2

    So the "best practice" for MS-Windows was to randomly generate UIDs to avoid user accounts on different machines from having the same UID? This would have made sense had NFS been common, where indeed duplicate UIDs are an issue. But windows does not support NFS mounts -- and SMB mounting is based on a local account on the remote machine. There must be some subtlety here, or else why has this taken years to figure out?

    1. Re:Duplicate UIDs by RAMMS+EIN · · Score: 3, Insightful

      The "subtlety" here is that Windows is extremely complex. I don't think anybody knows exactly how it works. Given that, it is hard to determine conclusively whether something can cause problems or not. Without that knowledge, it is best to err on the safe side.

      --
      Please correct me if I got my facts wrong.
  7. It's the usual story by dbIII · · Score: 5, Funny

    A ggreat deal of Microsoft security is unfortunately just like the underwear of Brittany Spears.
    If it's even there at all it's needlessly complex and frilly, looks good without actually covering much and is far too easy to get around or remove completely.
    The excessive complexity for no good reason of the SID and the way UIDs are implemented on that array of platforms are a good example of this.

    1. Re:It's the usual story by flydpnkrtn · · Score: 5, Funny

      Based on this post, I move that we change the default Slashdot analogy model from cars to one based around celebrity wardrobe malfunctions. This was simply awesome sir

    2. Re:It's the usual story by jkrise · · Score: 2, Funny

      Thanks for a good laugh, Sir! But at least in Britney's underwear, it covers something useful.

      --
      If you keep throwing chairs, one day you'll break windows....
    3. Re:It's the usual story by humphrm · · Score: 3, Funny

      Or, its covering of something is useful.

      --
      -- "In order to have power, I must be taken seriously." -Mojo Jojo
  8. With an important caveat! by derinax · · Score: 5, Informative

    "As I said earlier, there’s one exception to rule, and that’s DCs themselves. Every Domain has a unique Domain SID that’s randomly generated by Domain setup, and all machine SIDs for the Domain’s DCs match the Domain SID. So in some sense, that’s a case where machine SIDs do get referenced by other computers. That means that Domain member computers cannot have the same machine SID as that of the DCs and therefore Domain. However, like member computers, each DC also has a computer account in the Domain, and that’s the identity they have when they authenticate to remote systems. All accounts in a Domain, including computers, users and security groups, have SIDs that are based on the Domain SID in the same way local account SIDs are based on the machine SID, but the two are unrelated."

    The low ramifications of this as mentioned above may have changed post Win2K and XP. This particular caveat governed our processes as system deployment specialists for Microsoft corporate events. We had to make sure that any potential DC had a unique SID even before the machines were promoted to DC, otherwise we saw (verifiably!) many issues with Workstations failing to join the domain. I seem to recall other more esoteric issues with older Microsoft server products, but that may be delusions based on the mass hysteria we had about unique SIDs at the time.

    1. Re:With an important caveat! by mysidia · · Score: 5, Interesting

      I think there's an elegant, simple solution to this.

      Microsoft should incorporate NewSID into the DCPROMO utility, and force generation of a new SID as part of the process of initializing a new domain (even if it means that another reboot will be required).

      Since it's the only case where a DC needs to have a unique SID.

      And domain creation is certainly an extra special case. Most potential DCs won't ever be used to perform the initial creation of a windows domain: in general, only 1 DC per domain is supposed to ever have that privilege over the entire lifetime of the Windows-based LAN, which usually means only 1 server per organization will actually ever need to have had a unique SID.

    2. Re:With an important caveat! by alexschmidt · · Score: 2, Interesting

      I run VMWare at a college and we typically have the students run a scenario of Primary and secondary DC's. Unless we used NewSID, we had problems. The weird part was, it was intermittent. Some students would create multiple copies of the same image and had no problems, others would have nothing but grief unless they used NewSID.

    3. Re:With an important caveat! by DangerousDriver · · Score: 5, Informative

      Here's what happens when a DC and member server are both cloned from the same base image with identical SIDs:

      Event Type: Error
      Event Source: NETLOGON
      Event Category: None
      Event ID: 5516
      Date: 04/11/2009
      Time: 08:52:35
      User: N/A
      Computer: SERVER01
      Description:
      The computer or domain SERVER01 trusts domain TESTDOMAIN. (This may be an indirect trust.) However, SERVER01 and TESTDOMAIN have the same machine security identifier (SID). NT should be re-installed on either SERVER01 or TESTDOMAIN.

      For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    4. Re:With an important caveat! by Chang · · Score: 3, Informative

      NewSID changes the machine SID

      Unjoining and rejoining changes the domain SID

      They aren't the same thing and MS support should have told you that.

  9. Oh, right... that. by tverbeek · · Score: 3, Interesting

    For what it's worth, using NewSID (or some other technique to accomplish the same thing) was too much trouble to do the first time when push came to deadline and I had to crank out a few hundred WinXP workstations for the college labs. I didn't have any problems. Never gave it another thought.

    --
    http://alternatives.rzero.com/
  10. It is no myth by blake1 · · Score: 3, Insightful

    Speaking from experience, having two machines with the same SID on a single Domain you will have issues related to the computer account in Active Directory. Remove one of these computers from the Domain and the others will experience Netlogon errors and various other issues as a result. Although NewSID may no longer be relevant due to lack of Vista/2008/7/2008R2 support, you should always sysprep /generalize to prevent these issues from occuring. Not too sure why an MS blogger would have this stance, I've seen it numerous times (10+) with my own eyes. The fix is to either perform an offline workgroup join and generate new SID's on all but 1 affected machine, or to remove machines, NewSID all but one, and rejoin the Domain.

  11. In other words... by jkrise · · Score: 5, Insightful

    Microsoft is now my employer, and I have no reason to cater to the needs of the user community anymore.

    --
    If you keep throwing chairs, one day you'll break windows....
  12. Finally validation! by shemp42 · · Score: 3, Funny

    I have said this for years, glad its finally being widely accepted. My coworkers when ghosting machines would be fanatical about changing the SId's. I have a bad memory and would often forget to change them with no problems. I finally just started skipping the step of changing SID's and never had any adverse issues. When I told me coworkers about this they would rattle off a liteny of problems that I "could" encounter. After 10 years its nice to know I was right all along. So now a drum roll please...... IN YOUR FACE....MY COWORKERS!

  13. Man with a hammer by NoYob · · Score: 3, Funny

    And then we found the moveuser.exe utility on the server resource kit and asked them what the $250,000 was for. Not that anyone who pays two hundred and fifty thousand dollars for a few lines of vbscript is smart (the phbs wanted something bonafide), but I'm just sayin'...

    A company was having a problem with one of their machines, so they called in this specialist. The specialist came in, examined the machine, pulled out a hammer and tapped the machine. The specialist then produced a bill for $1,000. When asked why he was charging $1000 for just tapping he machine with a hammer, the specialist replied, "You're paying for me to know where to tap the machine with the hammer."

    The bill was paid.

    --
    It's NOT me! It's the meds! I'm on 1000mg of Fukitol.
    1. Re:Man with a hammer by norpy · · Score: 3, Funny

      I believe the anecdote is this:

      There was an engineer who had an exceptional gift for fixing all things mechanical. After serving his company loyally for over 30 years, he happily retired. Several years later the company contacted him regarding a seemingly impossible problem they were having with one of their multimillion-dollar machines. They had tried everything and everyone else to get the machine to work but to no avail. In desperation, they called on the retired engineer who had solved so many of their problems in the past. The engineer reluctantly took the challenge. He spent a day studying the huge machine. Finally, at the end of the day, he marked a small "x" in chalk on a particular component of the machine and said, "This is where your problem is." The part was replaced and the machine worked perfectly again.

      When the company received a bill for $50,000 from the engineer for his service, they demanded an itemized accounting. The engineer responded briefly: One chalk mark $1. Knowing where to put it $49,999. The bill was paid in full, and the engineer retired again in peace.

  14. Re:ID by pete-classic · · Score: 2, Funny

    Very nice.

    Bill Cosby did a bit, "Why is there Air?" He's well known for being a Doctor of Education, but as an undergrad he was a Physical Education major. His mock reaction to this fact, "Ha, ha. Phys. Ed. You're dumb."

    He relates the story of attending a Philosophy class where the titular question is posed. He comically states his surprise at the question. Something like, "Any Phys. Ed. major can tell you that. To fill up footballs, and volley balls, and soccer balls!"

    You stand in fine comedic company!

    -Peter

  15. Great. by Wumpus · · Score: 4, Insightful

    Doesn't it bother anyone else that even Microsoft doesn't have a clue how the OS they developed works anymore? That something like this is even an issue?

    1. Re:Great. by Wumpus · · Score: 4, Insightful

      But not every product is equally complex. I can't think of a feature that's critical to the proper basic administration of a Unix network that's equally poorly understood, to the point that it's considered news when someone figures it out after 10 years.

      The feeling I often get when developing for Microsoft's platform is that it is gratuitously complex. Complex APIs are routinely replaced with new, more complex ones. API calls that take a dozen or so arguments, with some of them pointing to structures containing dozens of members, return error codes that complain of a bad argument - good luck finding out which one of the 30 or so the system found to be offensive. Bugs go unfixed for years. It's all rather unpleasant, really.

  16. Google "COMMANDO" by mosel-saar-ruwer · · Score: 5, Funny

    A ggreat deal of Microsoft security is unfortunately just like the underwear of Brittany Spears.

    GOOGLE IMAGES: britney spears commando

  17. Duplicate SIDs are a huge problem with KMS by Asmor · · Score: 2, Interesting

    As a student, I worked for the CS department. It was just me and my boss, and we both had extremely limited hours. Thus, we didn't have a whole lot of time or opportunity to figure out how to do things 'the right way' whenever that would change, and just kept doing things as we had been.

    This was a problem when Vista was deployed. Once we got out image to where we wanted, we would ghost it and deploy to about 60 machines. For Vista, we used a KMS (Key Management Server) which is one of the options you have for licensing large numbers of machines. In a nutshell, each machine contacts the KMS and gets a license for itself.

    This was supposed to be strictly limited to volume licensing; thus, the KMS would not activate any machines until it had at least 25 different machines registered to it.

    Now, ideally what would happen is that before you make your image you'd basically set Windows into a 'deployment mode' (not the technical term) where, the next time it's booted, it would go through and reinitialize everything for the machine it's on, and part of this involves generating a unique SID.

    We toyed with this a bit with the time we had, but couldn't get it to a place where we were happy with the results. In particular, we had some issues with networking, IIRC, that means we would have had to go and manually setup every machine for our network.

    TL;DR: All of our machines had the same SID, the KMS only say 1 unique installation even though 60 machines were connecting to it, and Vista wouldn't activate. In order to fix it, we had to change the SIDs for each machine.

    So to say that duplicate SIDs are not a problem is erroneous indeed.

  18. Re:ID by JustOK · · Score: 2, Funny

    I had to take Golf Ball Inflation six times before I passed.

    --
    rewriting history since 2109
  19. Really? by Sycraft-fu · · Score: 4, Interesting

    This surprises me. I'm not going to say he's wrong, after all the man literally wrote the book on Windows (Windows Internals from Microsoft Press, great book) but it just seems odd. We seem to have problems at work if a system is Ghosted, but not SID walked. It'll join the domain, but exhibit weird problems, like users not able to log in and such. Now maybe GhostWalk does other things too that are what really needs to be done, but it seems to just be a SID change tool.

    Personally I'll keep using GhostWalk until Symantec removes it.

  20. Re:Hmm... Pretty sure I ran into an issue somewher by Anpheus · · Score: 3, Informative

    You should sysprep the machines to reset their state before joining the machines. Basically, you should create a stock VM that is your disk image right after a "sysprep" and then NEVER EVER do anything with that. Clone it, complete the setup process, and join that cloned machine to the domain.

    So in your case, you should have installed each VM from the ISO/CD and joined the domain, or used a first sysprepped disk image, cloned that twice, and used the two clones to join the domain.

    The reason is that sysprep does the necessary work to separate two machine's identities in a more significant way than just the SID.

    Microsoft's policy is you should never clone a disk image in a domain environment without first running sysprep. NewSID was just a way of doing "sysprep lite."

  21. Re:ID by Dahan · · Score: 2, Informative

    He has (numerous) honorary doctorates, but he earned his Ed.D.

  22. Ignorant and inconsiderate by BitZtream · · Score: 3, Informative

    Not so much of Mark, if he doesn't want to maintain it, thats fine, it was free, I get it.

    However ... this is typical of MS.

    They tell us (developers) that the sid will be unique. We write software that expects this and uses the sid as a unique ID.

    Now they come along and say 'naaa, its not important to be unique, use the same sid all you want, no one will notice!'

    And then I have to say ... thank god for real OSes where backwards compatibility is a rule for a reason, not just because they need it to maintain compatibility. They throw corner cases to the wind and go back on something they've said for years, completely ignoring the fact that people have built things based on something they said was a requirement.

    This is the forth change that will break (or potentially in this case) software I have to maintain. Two patches that remove existing functionality in the name of security with the argument that 'no one uses it that way', to which Google can clearly show to be wrong. Even better is that one of them, a change to the DHTML control breaks some of their own apps, OWA for instance.

    Its fucked up when you have to find a hack via Google to fix a bug in MS software that they say doesn't effect anyone ... except everyone that uses one of their more popular clients. Their response is 'patch exchange' which breaks OTHER things.

    STOP

    CHANGING

    BINARY

    COMPATIBILITY

    you worthless fucks. Yes, I'm annoyed.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    1. Re:Ignorant and inconsiderate by DrXym · · Score: 2, Insightful

      I think you would be hard pushed to find any OS which tried to maintain the level of backwards binary compatibility as Windows has traditionally provided. Sure some things break from release to release, but generally the majority works extremely well. Given the hideous complexity of Windows this is nothing short of a minor miracle.

  23. NewSID allows for activation reset? by ard · · Score: 5, Interesting

    From the article:

    This is called generalizing the image, because when you boot an image created using this process, Sysprep specializes the installation by generating a new machine SID, triggering plug-and-play hardware detection, resetting the product activation clock, and setting other configuration data like the new computer name.

    Is the product activation clock reset because of Sysprep, or because the SID is changed?

    In other words, could NewSID be used to keep unactivated windows installations running indefinately?

    <conspiracy_theory> Would that be the real reason for the NewSID retirement? What's the rush of removing the download instead of leaving it unsupported? </conspiracy_theory>

  24. I'll miss NewSID by Darkon · · Score: 4, Insightful

    Not that I ever used it to generate a completely new SID, but what I did find it invaluable for was to set a machine's SID back to its old value after a re-install. This did away with the need to change the ownership on all of the user's files still on the hard drive and meant that most of the time their user profile would just keep on working as if nothing had changed.

  25. Re:Do Not Do This by KGBear · · Score: 2, Funny

    I know, brother. I agree. Do you know what my Windows support people reply to that? "Who cares? When it breaks, just clone it again."