Announcement

Collapse
No announcement yet.

distinguishedName comes encoded sometimes

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Re: distinguishedName comes encoded sometimes

    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

    Comment

    Working...
    X