Questions tagged [distinguishedname]

The X.500 Directory (LDAP f.i.) uses distinguished names (DNs) as primary keys to entries in the directory. A DN is a sequence of relative distinguished names (RDN) connected by commas.

The X.500 Directory uses distinguished names (DNs) as primary keys to entries in the directory. The RFC 1779 defines the string representation of DNs, which are also used in the Lightweight Directory Access Protocol (LDAP) to transfer distinguished names.

The LDAP API references an LDAP object by its distinguished name (DN). A DN is a sequence of relative distinguished names (RDN) connected by commas. An RDN is an attribute with an associated value in the form attribute=value.

The following are examples of two distinguished names.

CN=Jeff Smith,OU=Sales,DC=Fabrikam,DC=COM
CN=Karen Berge,CN=admin,DC=corp,DC=Fabrikam,DC=COM

Sources: RFC 4514: LDAP String Representation of Distinguished Names and MSDN.

68 questions
0
votes
1 answer

Query for Global Catalog fails to fetch the object details

I have a windows AD server machine (2012 windows), say 'abc.com'. From the client, I try with port '636' and '3269'. With port '636' and base-dn set as 'DC=abc,DC=com' and bind-dn set as 'CN=Administrator,DC=abc,DC=com', I am able to lookup for a…
0
votes
3 answers

-replace (value) with an escape char?

I need to pull first and last names from accounts that were very poorly named from the previous IT administrator and recreate them in the same source OU. There are characters in the account name I that I cant seem to get past. I need to pull…
0
votes
1 answer

RFC 2253 - Lightweight Directory Access Protocol (v3)

I'm using the following: https://www.novell.com/documentation/developer/jldap/jldapenu/api/com/novell/ldap/util/DN.html in my application. For the creation of the DN object, I need to put dnString, that must adhere to the syntax described in RFC…
ChikChak
  • 936
  • 19
  • 44
0
votes
2 answers

Active Directory search using DN (distinguished name)

I am working on a PHP function to get the manager of an active directory user(using the users email address). After getting the manager, I want to get the managers e-mail address. I use this code to get the manager: //Search using a filter. …
Sardar Agabejli
  • 423
  • 8
  • 32
0
votes
0 answers

Send a request in soapUI impersonating someone other than oneself

I have a POST request step in soapUI that works successfully with my SSL certificate. It uses the certificate (key may be more accurate) that I saved in soapUI's application configuration settings. What I want to do is make this request as some test…
Guy
  • 666
  • 1
  • 10
  • 34
0
votes
2 answers

How do I isolate an AD Distinguished Name, and get rid of extra lines?

I'm trying to print just the first level(?) distinguished name of a person's AD group. A lot of people are part of many groups, and so far, with the groups listed on multiple lines, I've used -replace to get rid of everything except the thing I…
0
votes
2 answers

How to make ldap return only cn

I want to let ldap search accounts starting with z and then show only cn's (without "cn:") in reverse alphabetical order, and not case-sensitive. Also I'm trying to remove empty lines between cn's. Here's my script now. Stuck on it ldapsearch -o…
Alexander
  • 109
  • 1
  • 2
  • 14
0
votes
1 answer

What's my Active Directory Distinguished Name? What's my LDAP TREE?

I'm trying to make auth calls connecting from php to an Active Directory server auth looks fine but I don't know what to put as ldap_search parameters. dump of ldap_connect: resource(4) of type (ldap link) dump of ldap_bind: bool(true) dump of…
Riccardo
  • 346
  • 2
  • 17
0
votes
1 answer

How to search in LDAP in two different distinguished names

My LDAP is like these: dn :uid=alice,ou=people,dc=tik,dc=test,dc=com name:alice email:alice@tik.test.com dn :uid=jack,ou=people,dc=test,dc=com name:jack email:jack@test.com How can I search with the ldapsearch command to get two sub DN? I know I…
0
votes
1 answer

Python LDAP error with spaces:ldap.INVALID_DN_SYNTAX: info -00002081: NameErr: DSID-03050C42

import ldap import base64 import ldap.modlist as modlist server = "ldaps://X.X.X.X:636" who = 'administrator@bru.com' cred = base64.b64decode(XXXXXXXXXXXXXX) path = 'dc=bru,dc=com' dn ='CN=saauto\…
0
votes
1 answer

Get DN from certificate in ASN.1 format

I'm trying to get the DN from a certificate in ASN.1/DER format. I have searched OpenSSL but still cannot find the exact function to get the DN. Does anyone have any experience regarding this or can point me to books or any website?
Acan1234
  • 65
  • 1
  • 9
0
votes
3 answers

I need to get the first OU from a Distinguishedname

I have this PS query to get the Distinguishedname of servers: $AD = get-adcomputer -filter {OperatingSystem -like '*Server*' -and OperatingSystem -notlike '*2003*'} -property name, description, DistinguishedName | Select name, description,…
TOGEEK
  • 711
  • 4
  • 15
  • 34
0
votes
1 answer

Get AD distinguished name

I'm trying to take input from a CSV file, which has a list of group names (canonical names) and get the Distinguished Name from it, then output to another CSV file. The code: #get input file if passed Param($InputFile) #Set global variable to…
Austin
  • 23
  • 1
  • 9
0
votes
3 answers

Looking to extract information using powershell

I need to extract information using a powershell cmdlet and a txt file. The TXT file contains a list of groups I want to first feed powershell the script... pretty simple: get-content c:\scripts\mygroups.txt I then want to run a Foreach-object…
0
votes
2 answers

How to connect with Active Directory without a full CN/DN from Java code

I have implemented method: public static LdapContext buildContext(String username, String password) { LdapContext context = null; Hashtable env = new Hashtable(); …
ruhungry
  • 4,506
  • 20
  • 54
  • 98