Scott Hanselman

Ender's Job - Software Engineer or Protector of Mankind?

July 22, '03 Comments [0] Posted in Web Services | Gaming | Tools
Sponsored By

A great analysis of how Ender's Game (one of my all time favorite books, I've read the whole series) can teach us about software engineering.  I'm re-reading the Pragmatic Programmer now and I didn't realize that Andy and Dave were blogging. RSS Subscribed.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Finding out the name of the EVERYONE Group on a non-english (International) version of Windows

July 21, '03 Comments [1] Posted in Web Services | Internationalization
Sponsored By

I preach a lot about awareness around issues of Internationalization.  Issues arise when we make assumptions.  For example, if you have code that assumes the security group "Everyone" is called "Everyone" on a non-english Windows box...well, you can guess that "results are not guaranteed."

Typically (in C++/SDK) you don't refer to these groups by name, but rather by SID.  Depending on what you're doing, there's a number of ways to figure these things out.  Perhaps instead of using “Everyone,” use the Everyone SID: (S-1–1–0)

You may want to call AllocateAndInitializeSid...see Creating Security Descriptor and most importantly the list of Well-Known SIDs.

Call AllocateAndInitializeSid to obtain the SID of the Everyone group. In the parameters passed to AllocateAndInitializeSid, the number of subauthorities in the SID is set to 1, and the value of the first subauthority is set to SECURITY_WORLD_RID.

PSID BuildEveryoneSid() {
   SID_IDENTIFIER_AUTHORITY auth = SECURITY_WORLD_SID_AUTHORITY;
   PSID pSID = NULL;
   BOOL fSuccess = AllocateAndInitializeSid(&auth, 1,
      SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &pSID);
   return(fSuccess ? pSID : NULL);
} //(Call FreeSid() when you’re done…)

Or, call LookupAccountSID and receive the name as an out parameter.

Or, use this Russian fellow's old util. http://www.chem.msu.su:8080/~rudnyi/NT/sid.txt (sid2user, user2sid, source code here.) from the command line or script and get output like this: 

C:\Documents and Settings\SHanselm\Desktop\Utils>user2sid "Everyone"
S-1-1-0
Number of subauthorities is 1
Domain is
Length of SID in memory is 12 bytes
Type of SID is SidTypeWellKnownGroup

C:\Documents and Settings\SHanselm\Desktop\Utils>sid2user 1 S-1-1-0
Name is Everyone
Domain is
Type of SID is SidTypeWellKnownGroup

I'm sure there's a way to do with from both Windows Scripting Host (VBS) and .NET (C#) given a SID, so if you know, let me know.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Recovering passwords from old locked Windows 2000 systems...

July 17, '03 Comments [1] Posted in Web Services
Sponsored By

I lost the Administrator password to an old Windows 2000 Server that needed to be patched desperately.  It had been running happily in my closet for over 2 years.

So, how to recover the Admin PW for this beAst?  There’s always:

But those cost more money than I am willing to put into this machine (as the machine is hardly worth $199, so, how about:

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.