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
3
votes
1 answer

Get manager's employees from AD

I am trying to get a list of employees of a manager given his DN. Assuming logged in user is a manager, 1) Search for the manager in active directory using the sAMAccountName (i.e. Domain ID) and retrieve the distinguishedName 2) Search for all…
NoBullMan
  • 2,032
  • 5
  • 40
  • 93
3
votes
1 answer

Adding a DN subject alternative name extension in an X509 certificate using openssl

I have been using openssl API to create my own certificate utility. I am currently facing an issue when adding a distinguished name in the subject alternative name extension. Although the extension is successfully created, the value of the extension…
telemahos
  • 63
  • 6
2
votes
0 answers

How to get users of Exchange server by Distinguished name using LDAP in notes directory

I am trying to get Distinguished name of users from exchange server in notes using LDAP to set bearbeiter field,so no one will have access on that particular document except the users which are added in bearbeiter field.I have tried other types of…
2
votes
1 answer

"new DirectoryEntry(distinguishedName as string)" doesn't work when DN contains a "/"

I have the following code to convert a distinguishedName to a sAMAccountName: Dim de As New DirectoryEntry("LDAP://" & stringDN) Return CType(de.Properties("samaccountname")(0), String) It works great for every DN I pass it, except for one. We have…
2
votes
2 answers

How to get FQDN of a Target User's (Different) Domain?

How can I get the Fully Qualified Domain Name (FQDN) for a user on a different, trusted domain? Normally, I would ask said user to take any one of the approaches outlined here (e.g. whoami /fqdn or echo %userDNSdomain%), but if this approach isn't…
2
votes
1 answer

Using CertReq.exe, how to encode special characters in Subject

We are using Microsoft Certificate Request (CertReq.exe) to build certificate requests programmatically. For this purpose, we have to create input INF files, see docs here. The Subject property is defined as Relative Distinguished Name string…
gpinkas
  • 2,291
  • 2
  • 33
  • 49
2
votes
2 answers

How do you filter on an LDAP attribute that uses the dn syntax using the ColdFusion CFLDAP tag?

Using the CFLDAP tag in ColdFusion I can successfully retrieve someone's distinguidedName and manager attributes with a filter like this: (&(objectcategory=person)(objectclass=user)(mail=tim.test@nls.uk)) This reveals values such as these for the…
2
votes
2 answers

LDAP search base DN not working

I'm trying to perform an LDAP search into many different OUs that are located at the root of the directory. Context initialization: Hashtable env = new Hashtable(); env.put(Context.SECURITY_AUTHENTICATION,…
2
votes
2 answers

Microsoft Exchange: How To Resolve A Distinguished Name

How can i resolve this: /O=CHEESE/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=LHALA1 to an email address? Do i have to use Exchange Web Services?
2
votes
2 answers

How to get a computer's Distinguished Name (DN) with C++

I can't seem to find a way to get a DN of a workstation (computer) with C++ and WinAPIs. Any ideas how to do this? PS. The workstation is connected to a domain controller. PS2. I need the DN of a computer and not the logged on user.
c00000fd
  • 20,994
  • 29
  • 177
  • 400
2
votes
2 answers

Get distinguished name from Active Directory of currently logged in user

How can I get the distinguished name from Active Directory of the currently logged in user in C#?
Tunc Jamgocyan
  • 321
  • 2
  • 7
  • 18
1
vote
1 answer

X509 Certificate Modifying Distinguished Name Field

Due to size limitation, I would like to alter OpenSSL configuration file so then I would be able to generate smaller x509 certificates. Is it possible? If so, I would like to have a Pseudo ID instead of all distinguished name fields. When I want to…
CppChase
  • 901
  • 12
  • 25
1
vote
1 answer

Extract Domain from DistiniguishedName using PowerShell

I tried the following code to extract the domain and it worked just fine when defining a variable $ADS = 'CN=Lamda,OU=OU_Bloquage,DC=Adminstrateur,DC=6NLG-AD' But things didn't go well when I changed $ADS into $ADS = Get-ADUser -Identity 'Lamda'…
MKH_Cerbebrus
  • 51
  • 2
  • 10
1
vote
1 answer

Get specific object attribute from ldapjs search

I'm binding and authentication a user to ldap as it is shown in the code below. Now i'm getting all the attributes of the object, what i want is to get just the 'distingushedName' for example. Is there a method in ldapjs for that? Is it a filter…
1
vote
1 answer

How can I split AD information in Powershell into a excel document?

I am a Powershell starter. I have been trying to create a script, that makes an Excel file with some AD information including the DistinguishedName. My script looks like this: $dn = Get-ADUser -Filter * -SearchBase…
verfluecht
  • 493
  • 6
  • 24