查找帐户 GUID,然后使用对象 GUID 将其重新选择
我正在尝试从 Active Directory 中为帐户选择唯一标识符。我发现“objectguid”属性确实唯一地标识了用户,但我的问题是我不知道如何将检索到的值转换为可读格式。然后能够使用该值选择用户。
我正在使用 spring ldap 库,现在“objectguid”返回 char[] (15 个元素)
那么,有谁知道有什么可以提供帮助的吗?
(注意,我不能使用 SAM 名称属性)
谢谢,
I am trying to select a unique identifiers for accounts from Active Directory. I found that "objectguid" attribute do identify a user uniquely, but my problem is that I don't know how to convert the retrieved value into a readable format. And then be able to select a user back using this value.
I am using spring ldap libraries, right now the "objectguid" return a char[] (15 element)
So, Does any one knows any thing that can help?
(Note, I can't use SAM Name attribute)
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅此处。似乎有两种字符串格式:
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
,您可以通过new BigInteger(0, (byte[])attr.get()) 获取。 toString(16)
和XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
,这是同一个东西加上标点符号。See here. It appears there are two string formats:
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
, which you can get vianew BigInteger(0, (byte[])attr.get()).toString(16)
, andXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
, which is the same thing plus punctuation.