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
11
votes
4 answers

Where can I find a listing of LDAP Active directory messages and there meanings?

I am getting the error: LDAPException: Invalid Credentials (49) Invalid Credentials LDAPException: Server Message: 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1 LDAPException: Matched DN: Where is a…
GC_
  • 1,673
  • 6
  • 23
  • 39
9
votes
3 answers

Finding CN of users in Active Directory

I'm trying to find the Base DN of the user that can access or controls all the users in Active Directory so I can put it in my LDAP. Usually someone will give me this, and it looks like DC=domain,DC=company,DC=com But the admin is not available, so…
elcool
  • 6,041
  • 7
  • 29
  • 44
6
votes
2 answers

What's the difference in using distinguished name with cn or uid when logging into LDAP?

I'm running into a problem using LDAP to authenticate logins. We are using a Novell edirectory for authentication of other applications like Jira. ( Jira works perfect ). I have this application that allow these basic LDAP configurations: My…
jeph perro
  • 6,242
  • 26
  • 90
  • 124
5
votes
1 answer

Make LDAP search don't show DN

How would I make a bourne shell code for a LDAP search to not return DN and return only CN? I am using iTerm2 for this.
Claudiu Kiss
  • 63
  • 1
  • 3
5
votes
2 answers

X500Principal Distinguished Name order

I'm using the Bouncycastle lib to generate certificates from PKCS10 requests using the X509v3CertificateBuilder class. It returns build a X509CertificateHolder object which contains the generated certificate. If I call getIssuer on the holder, it…
Daniel
  • 279
  • 1
  • 5
  • 14
4
votes
4 answers

Get CN value from ADUser DistinguishedName

I have a PS script that checks some custom user's properties in Active Directory. One of the properties is "Manager". $data = Get-ADUser $user -Properties * | Select-Object DisplayName, LockedOut, Enabled, LastLogonDate, PasswordExpired,…
Stan Di
  • 83
  • 1
  • 2
  • 7
4
votes
1 answer

Why in active directory group cannot be created as groupType = Local

I am not able to understand why creating group in active directory as "local" for groupType doesnt work. it throws following exception : System.DirectoryServices.DirectoryServicesCOMException (0x80072035): The server is unwilling to process the…
Usman
  • 2,742
  • 4
  • 44
  • 82
4
votes
1 answer

Query Active Directory using DistinguishedName

I have an application that uses Windows authentication and I am trying to get logged in users info using their domain IDs. Part of the data returned is the user's manager's DN (in manager property). I need to query AD again to get manager's info…
NoBullMan
  • 2,032
  • 5
  • 40
  • 93
4
votes
4 answers

Ordering of RDN attributes in a CA's certification sign process

I have difficulties to understand the ordering of the attributes (AttributeTypeAndValue) in the RDN (RelativeDistinguishedName). Here are the relevant ASN.1 definitions (taken from www.in2eps.com): TBSCertificate TBSCertificate ::= SEQUENCE { …
duesee
  • 141
  • 1
  • 9
4
votes
4 answers

How to Split DistinguishedName?

I have a list of folks and their DN from AD (I do not have direct access to that AD). Their DNs are in format: $DNList = 'CN=Bob Dylan,OU=Users,OU=Dept,OU=Agency,OU=NorthState,DC=myworld,DC=com', 'CN=Ray…
4
votes
3 answers

How to get distinguished name for a member computer when it's not connected to DC with C++

I would normally get the distinguished name of a member computer on the Active Directory network by calling: TCHAR buff[256]; buff[0] = 0; DWORD dwSz = SIZEOF(buff); GetComputerObjectName(NameFullyQualifiedDN, buff, &dwSz); But the issue happens…
ahmd0
  • 16,633
  • 33
  • 137
  • 233
4
votes
6 answers

Regular Expression to parse Common Name from Distinguished Name

I am attempting to parse (with sed) just First Last from the following DN(s) returned by the DSCL command in OSX terminal bash environment... CN=First Last,OU=PCS,OU=guests,DC=domain,DC=edu I have tried multiple regexs from this site and others with…
Ben
  • 63
  • 2
  • 7
4
votes
4 answers

change distinguished name format in OpenLDAP

i have the following problem: i have installed and OpenLDAP server in which in the people/users tree the distinguished name have the following format: Distinguished Name: cn=Luigi Rossi,ou=people,dc=prisma,dc=local The problem is i wish to replace…
Indio
  • 337
  • 1
  • 3
  • 12
3
votes
1 answer

openssl req utf8 strings

as others i'm struggling with utf8 in requests. sure i went through all preciding questions and answers. well here is my workout. configuration: [ req ] default_bits = 2048 default_md = sha256 string_mask = utf8only utf8 …
3
votes
2 answers

REGEX - Extract OU from Distinguished Name

I need to extract "OU" part from my Distinguished Name with REGEX. For exemple : "CN=DAVID Jean Louis (a),OU=Coiffeur,OU=France,DC=Paris,DC=France" "CN=PROVOST Franck,OU=Coiffeur,OU=France,DC=Paris,DC=France" "CN=SZHARCOFF Michel…
P0werSh3ell
  • 103
  • 1
  • 6
1
2 3 4 5