?
Solved

Convert Hex SID to Dec SID

Posted on 2004-04-27
2
Medium Priority
?
2,261 Views
Last Modified: 2012-05-04
I have a quick but relatively complex question
 
Environment - Native Mode, Win 2000 Active Directory.
 
I am looking for a method to convert an active directory HEX value of a User's SID into is Decimal value
 
For example a user account value in the registry can be displayed as S-1-5-21-1390067357-484763869-1801674531-3404 as it's Decimal value or 15 15 52 da be 9d 1c e4 e8 dd 6b 63 5f 23 d4 c as it's HEX Value.
 
What I would like to achieve is a way to convert between the 2, using script. That way I can setup a scrip to 1st Poll a resource to gain the HEX value of a SID and then resolve that to the DEC value so that I can compare it against another Resource.
 
If there is any function in either VBScript, WMI, WSH or ADSI that would be beneficial.
0
Comment
Question by:davidsummers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 41

Expert Comment

by:graye
ID: 10935341
I'd be difficult to represent the HEX version of a SID in a script in anything other than a string.   Where are you getting this SID from?

I'd be a rather simple task to write a small application that translated a string of hex values into a SID-formated string.  I'll write you one...
0
 
LVL 85

Accepted Solution

by:
oBdA earned 375 total points
ID: 10936876
Try those for starters:

Platform SDK: Security      -- SID Components
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/sid_components.asp

Platform SDK: Security      -- Converting a Binary SID to String Format in C++
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/converting_a_binary_sid_to_string_format_in_c__.asp

HOWTO: Use Microsoft Visual Basic to Convert a Raw SID into a String SID
http://support.microsoft.com/default.aspx?kbid=286182

HOWTO: Convert the SDDL form of an SID to a SAM Account Name
http://support.microsoft.com/default.aspx?kbid=276208

How do I convert a SID between binary and string forms?
http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx
0

Featured Post

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Hey fellow admins! This time, I have a little fairy tale for you. As many tales do, it starts boring and then gets pretty gory. I hope you like it. TL;DR: It is about an important security matter, you should read it if you run or administer Windows …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question