[python-ldap] AD objectGUID conversion to string
Rob McBroom
mailinglist0 at skurfer.com
Fri Sep 19 20:53:27 CEST 2014
On 19 Sep 2014, at 10:44, Kernel Panic wrote:
> Hello everyone, when I extract the objectGUID value from an AD account
> I
> believe it is extracted in binary format, can anyone show me a way to
> convert that to a string similar to what you would get from
> Microsoft's
> csvde.exe tool?
No access to an AD server any more, but is it possible that the value is
base64 encoded? If `ldapsearch` shows two colons instead of one after
that attribute, that’s probably the case. If so, you just need to
decode it. There are a million ways to do it. In Python, it’s as easy
as
import base64
base64.decodestring(whatever)
--
Rob McBroom
http://www.skurfer.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20140919/707a9ddd/attachment.html>
More information about the python-ldap
mailing list