go ahead... be a heretic | |
PerlMonks |
Net::LDAP GUID...by muffinman (Initiate) |
on Apr 06, 2011 at 20:26 UTC ( [id://897883]=perlquestion: print w/replies, xml ) | Need Help?? |
muffinman has asked for the wisdom of the Perl Monks concerning the following question: Hello I'm talking to active directory through Net::LDAP, and I want to extract user GUIDs in a readable form. If I query a user, I don't get a GUID field, but instead a nasty contraption called objectGUID. This, I believe is supposed to be a 128bit binary field. In a debugger, it looks like this: 'objectGUID' => 'Q?Ot?qM?r/?'I have a GuidToString routine, filthily stolen from the internets, which I have posted below. In a nutshell, I'm looking for a hex string in the form: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" The below code gives me that, but something is just not right, especially as most of the strings I get back have > 8 0's on the end in most cases. Has anybody played with this before? Afaik, guid is the only thing that can never change on a users ad account, and I need to record these for a intranet based web app. Any help much appreciated... Here's that routine...
Back to
Seekers of Perl Wisdom
|
|