Petri IT Knowledgebase Forums
 

Petri.co.il forums Home Forums Start Page Forums Frequently Asked Questions FAQ Member List Members List
Go Back   Petri IT Knowledgebase Forums > Microsoft Networking Services > Active Directory
Petri.co.il is happy to award auglan the title of Most Valuable Member !!!
Register Calendar Calendar Search Petri IT Knowledgebase Forums Search Todays Posts Today's Posts Mark Forums Read

Notices

distinguishedName comes encoded sometimes

distinguishedName comes encoded sometimes

this thread has 1 replies and has been viewed 1009 times

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th November 2009, 12:47
pkilpo pkilpo is offline
Casual
Casual
 
 Join Date: Nov 2009
  6 month star 12 month star
 Posts: 1
 Reputation: pkilpo is on a distinguished road (10)
Default distinguishedName comes encoded sometimes

Hello,

I use ldapsearch to get a distinguishedName of a user. Then I check if user belong to certain group. However when user name contains non-7bit ascii letters like ä , distingquished name will be returned somehow encoded like this: Q049SWxhcmkgTMOkbnNpbGVpbXUsQ049VXNlcnMsREM9amFjLE RDPXZwbg

Whilst users who do not have such letter will be returned in plain text which works fine.

My question is how to decode that string? I use linux in firewall to authenticate vpn users like this. So eg. perl works, of some basic linux commands.

Thank you very much for reading this.

Regards, Pekka
  #2  
Old 17th November 2009, 15:43
Rems's Avatar
Rems Rems is offline
Moderator
 
 Join Date: Mar 2005
  6 month star 12 month star
 Location: NL
 Posts: 2,267
 Reputation: Rems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to behold (903)
Default Re: distinguishedName comes encoded sometimes

Quote:
Originally Posted by pkilpo View Post
I use ldapsearch to get a distinguishedName of a user. Then I check if user belong to certain group.

Active Directory requires that the following characters be escaped with the backslash "\" escape character:
, The comma
\ The backslash character
# The pound sign (hash sign)
+ The plus sign
< The less than symbol
> The greater than symbol
; The semicolon
" The double quote character (quotation mark)
= The equal sign
And Leading or trailing spaces. The space character must be escaped only if it is the leading or trailing character in a component name, such as a Common Name. Embedded spaces should not be escaped.
In addition, ADSI requires that the forward slash character "/" also be escaped. The ten characters above, plus the forward slash, must be escaped in VBScript programs because they use ADSI. If you view attribute values with ADSI Edit you will see the ten characters above escaped, but not the forward slash. Utilities (like adfind.exe) that do not use ADSI need to have the ten characters above escaped, but not the forward slash. (<- Richard L. Mueller ->)



\Rems
__________________

This posting is provided "AS IS" with no warranties, and confers no rights.

__________________

** Remember to give credit where credit's due **
and leave Reputation Points for meaningful posts
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +3. The time now is 18:17.

Steel Blue 3.5.4 vBulletin Style ©2006 vBEnhanced
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
 

Valid XHTML 1.0!   Valid CSS!

Copyright 2005 Daniel Petri