Home > Articles > Operating Systems, Server > Microsoft Servers

  • Print
  • + Share This
This chapter is from the book

Attributes and Syntaxes

In this section we discuss the attributes that define the attributes in the schema.

As with classes, there is a schema object for each attribute, which means a total of 863 attributeSchema objects in the base schema. Each of these 863 attributes is characterized by the attributes of its schema object and those attributeSchema objects themselves use 94 attributes out of the 863. Figure 8.15 shows the relationship between the attribute schema objects and their attributes.

Figure 8.15 The attributeSchema class has 863 instances (i.e., attributeSchema objects) in the base schema. Each of these 863 objects defines the syntax and other aspects of one attribute. The definitions reside in the attributes of the objects, which means that the attributeSchema objects define attributes also for themselves. This figure shows three attributeSchema objects, which result in 3 3 arrows on the right side.

NOTE

The other figures that we have included in this chapter show LDAP names as schema object names (although this is imprecise). In Figure 8.15 we show the common names (which is more correct), because we want to show the actual object name and the LDAP name attribute separately.

Of the 94 attributes that the attributeSchema class uses, it inherits 73 attributes from top and defines 21 on its own level. As with classes, most of the inherited attributes are quite general (after all, they apply to any Active Directory object). We cover only 13 of the inherited attributes and all 21 "own" attributes for a total of 34 attributes.

NOTE

When discussing classes, we listed 14 inherited attributes and now 13. The list is the same except that possibleInferiors doesn't apply here. For example, the homePhone of a user cannot have child objects.

We divide the 34 attributes into four categories.

  • Names and identifiers. You probably remember that classSchema objects have 14 various names, descriptions, and identifiers. attributeSchema objects have even more: 17 names, descriptions, and identifiers.

  • Syntax and content rules. These 7 attributes define the kind of data the attribute accepts and the values that are possible for it.

  • Searches. The 2 attributes in this category control things such as indexing of the attribute and whether it is part of the global catalog.

  • Miscellaneous. There are 8 miscellaneous attributes.

Table 8.14 shows all 34 attributes listed by their LDAP names. If the common name is quite different from the LDAP name, it appears in parentheses. The four sections following Table 8.14 describe the attributes in more detail. The Type column indicates whether the attribute is mandatory or optional. The Source Class column contains either attributeSchema or top—the latter meaning the attribute was inherited from the top class. The Base Schema Attributes column indicates the kinds of values the 863 attribute objects have for the attributes in the table. Finally, the LDAP Display Name Attribute Example column lists the values for the lDAPDisplayName attribute.

TABLE 8.14 Attributes of an attributeSchema Object

Name

Type

Source Class

Base Schema Attributes (863)

LDAP Display Name Attribute Example

Names and Identifiers

lDAPDisplayName

M

attr.S.

All values are unique

lDAPDisplayName

cn
(Common- Name)

M

attr.S.

All values are unique

LDAP- Display- Name

adminDisplayName

O

top

Same as cn

LDAP- Display- Name

name
(RDN)

O

top

Same as cn

LDAP- Display- Name

distinguishedName
(Obj- Dist- Name)

O

top

All values are unique

CN=LDAP-Display- Name,
CN=Schema,
CN=Configuration,
DC=sanao,
DC=com

canonicalName

O

top

All values are unique

sanao.com/
Configuration/
Schema/LDAP-Display-Name

displayName

O

top

Not used

displayName-Printable

O

top

Not used

classDisplayName

O

attr.S.

Not used

adminDescription

O

top

Same as cn

LDAP- Display- Name

description

O

top

Not used

attributeID

M

attr.S.

801 are Microsoft IDs (1.2.840.113556), 51 are X.500 IDs (2.5), 4 are Netscape IDs(2.16.840.1.113730), and 7 are "ITU-T data - PSS" IDs (0.9.2342)

1.2.840.113556.1.2.460

schemaIDGUID

M

attr.S.

All values are unique

9a7996bf
e60dd011
a28500aa
003049e2

objectGUID

O

top

All values are unique

22a9624f
4b998f46
a658e3c2
7a357859

attribute- SecurityGUID

O

attr.S.

128 are set; 735 are <not set>

mAPIID

O

attr.S.

70 are unique values; 793 are <not set>

33137

linkID

O

attr.S.

32 are unique values; 831 are <not set>

Syntax and Content Rules

attributeSyntax

M

attr.S.

All are set to 1 of 15 values

2.5.5.12

oMSyntax

M

attr.S.

99 are set to "127"; 764 are set to 1 of 14 values

64

oMObjectClass

O

attr.S.

99 are set; 764 are <not set>

isSingleValued

M

attr.S.

620 are True; 243 are False

True

rangeLower

O

attr.S.

163 are set; 700 are <not set>

1

rangeUpper

O

attr.S.

162 are set; 701 are <not set>

256

extendedChars- Allowed

O

attr.S.

All are <not set>

Searches

searchFlags

O

attr.S.

106 are nonzero; the rest 757 are zero

9

isMemberOf- Partial- AttributeSet

O

attr.S.

138 are True; 725 are <not set>

True

Miscellaneous

nTSecurity- Descriptor

M

top

All are set

A DACL, SACL, and so on

isDefunct

O

attr.S.

All are <not set>

systemOnly

O

attr.S.

93 are True; 770 are False

False

systemFlags

O

top

849 are set; 14 are <not set>

16

objectClass

M

top

All are top + attributeSchema

top + attributeSchema

objectCategory

M

top

All are CN=Attribute- Schema,
CN=Schema,
CN=Configuration,
DC=sanao,
DC=com

CN=Attribute- Schema, CN=Schema,
CN=Configuration,
DC=sanao,
DC=com

schemaFlagsEx

O

attr.S.

Not used

isEphemeral

O

attr.S.

Not used


NOTE

As a detail, lDAPDisplayName is a mandatory attribute of an attributeSchema object, but it is only an optional attribute of a classSchema object.

Names and Identifiers

Most of the names, descriptions, and identifiers for attribute schema objects are exactly the same as names, descriptions, and identifiers for class schema objects. Consequently, there is no need to repeat the descriptions of the following nine attributes:

  • lDAPDisplayName
  • cn (Common-Name)
  • adminDisplayName
  • name (RDN)
  • distinguishedName (Obj-Dist-Name)
  • canonicalName
  • adminDescription
  • schemaIDGUID
  • objectGUID

Also, the following four attributes are not used, as they were not used with class schema objects:

  • displayName
  • displayNamePrintable
  • classDisplayName
  • description

This leaves us with four not-yet-familiar attributes. They are described in Table 8.15.

TABLE 8.15 Some Name and Identifier Attributes of an attributeSchema Object

Name

Syntax

Multi- valued

Description

LDAP Display Name Attribute Example

attributeID

OID string

No

Object ID (OID) of the attribute.

1.2.840.113556.1.2.460

attribute- SecurityGUID

Octet string

No

ID that links the attribute to belong to some property set; permissions may then be given for this property set(see Chapter 6).

mAPIID

Integer

No

Messaging API (MAPI) applications identify attributes with this ID. Note that only 70 attributes have the mAPIID attribute set.

33137

linkID

Integer

No

Some attributes form forward-back link pairs, as discussed in the "Linked Attributes" section.


Linked Attributes

When an attribute refers to another object in the directory, it is often beneficial that the target object has a reference to the first object. An example is a user's membership in a group. The group has a member attribute, which includes the user (a forward link) and the user has a memberOf attribute, which includes the group (a back link). Figure 8.16 shows an example.

Figure 8.16 The member attribute is a forward link from a group object to a user object. The memberOf attribute is a back link from the user to the group. The relationship is defined in the corresponding attributeSchema objects.

An even value in the linkID attribute denotes a forward link and a larger-by-1 odd value denotes a back link.

The base schema contains the following 13 linked attribute pairs:

  • member—memberOf (Is-Member-Of-DL)
  • manager—directReports
  • siteObject—siteObjectBL
  • nonSecurityMember—nonSecurityMemberBL
  • queryPolicyObject—queryPolicyBL
  • privilegeHolder—isPrivilegeHolder
  • managedBy—managedObjects
  • hasMasterNCs—masteredBy
  • serverReference—serverReferenceBL
  • bridgeheadTransportList—bridgeheadServerListBL
  • netbootServer—netbootSCPBL
  • frsComputerReference—frsComputerReferenceBL
  • fRSMemberReference—fRSMemberReferenceBL

NOTE

If you count the attributes that have linkID defined, the number is not 2 3 13 = 26, but 32 instead. The reason is that the base schema includes 6 attributes that have linkID defined, but which are missing the corresponding back-link pair.

All back-link attributes, such as memberOf, are "system only"—that is, users or administrators cannot modify them. Active Directory is responsible for updating these attributes, maintaining referential integrity in the process. If either of the referenced objects is moved, Active Directory modifies the reference accordingly.

A forward-link attribute must use one of the following syntaxes: DN, DN with Unicode string, DN with binary, access point DN, and OR name. A back-link attribute must be of syntax DN.

Syntax and Content Rules

Seven attributeSchema attributes control the type of data and the values each attribute accepts. Table 8.16 describes these syntax and content attributes.

TABLE 8.16 Syntax and Content Attributes of an attributeSchema Object

Name

Syntax

Multi- valued

Description

LDAP Display Name Attribute Example

attribute- Syntax

OID string

No

Identifies with an X.500 OID whether the value of this attribute is integer, string, or some other data format.

2.5.5.12

oMSyntax

Integer

No

About the same as attributeSyntax but expressed with a XOM code.

64

oMObject- Class

Octet string

No

If the XOM code is 127 (=object distinguished name), this attribute defines the "subsyntax."

isSingle- Valued

Boolean

No

Specifies whether the attribute is single- or multivalued.

True

rangeLower

Integer

No

The lowest possible value for an integer attribute or the shortest possible value for a string attribute.

1

rangeUpper

Integer

No

The largest possible value for an integer attribute or the longest possible value for a string attribute.

256

extended- CharsAllowed

Boolean

No

Specifies whether the attribute can contain extended characters; used only with the syntax Teletex string.


The data type is called syntax in this context and it is defined by three attributes: attributeSyntax, oMSyntax, and oMObjectClass. Naturally, the three attributes must be consistent, as you see in Tables 8.17 through 8.20 where we describe all the syntax choices.

Several attributes are necessary to express the syntax because more than one standard is involved. The first attribute (attributeSyntax) defines an X.500 syntax, and the two others a XOM syntax. "XOM" stands for "XAPIA X/Open Object Management," an interface for ASN.1 messaging defined by X.400 API Association (XAPIA) and X/Open (a former vendor standards organization). Currently, "X/Open" is a trademark that belongs to Open Group (http://www.opengroup.org/).

NOTE

In "XAPIA," the X refers to X.400 and X.500 ITU-T standards, whereas in "X/Open," the X refers to UNIX.

NOTE

The letters XOM can also stand for "X/Open OSI-Abstract-Data Manipulation."

Syntax Choices

Active Directory supports 23 syntaxes, but it uses only 19 of them in the base schema. Because the syntax choices are hard-coded and don't appear as objects in Active Directory, you cannot add syntaxes.

We can divide the syntaxes into the following categories:

  • Simple data types (4 syntaxes)

  • String data types (10 syntaxes)

  • Time data types (2 syntaxes), which are actually also strings

  • Reference data types (7 syntaxes), which are various object references

Tables 8.17 through 8.20 describe the syntaxes of each category. Some syntaxes have two names, in which case we mention the second name in parentheses.

TABLE 8.17 Syntaxes for Simple Data Types

Syntax

attribute-Syntax

oMSyntax

Description

Count in Base Schema

Boolean

2.5.5.8

1

Values can be either TRUE or FALSE.

54

Integer

2.5.5.9

2

32-bit number.

149

Enumeration

2.5.5.9

10

32-bit number. Active Directory treats this as an integer.

6

Large integer(INTEGER8)

2.5.5.16

65

64-bit number.

66


TABLE 8.18 Syntaxes for String Data Types

Syntax

attribute- Syntax

oMSyntax

Description

Count in Base Schema

OID string

2.5.5.2

6

An object ID string (e.g., 2.5.5.2) consisting of digits (0–9) and dots

20

Case-sensitive string (case- exact string)

2.5.5.3

27

Case-sensitive6 string, each character of which belongs to the General- String character set7

0

Case-ignore string(teletex)

2.5.5.4

20

Case-insensitive string, each character of which belongs to the teletex character set7

8

Printable string

2.5.5.5

19

Case-sensitive string, each character of which belongs to the Printable character set7

13

IA5 string

2.5.5.5

22

Case-sensitive string, each character of which belongs to the International Alphabet 5 (IA5) character set7

7

Numeric string

2.5.5.6

18

String, each character of which is a digit7

2

Octet string

2.5.5.10

4

Array of bytes (i.e., binary data)

120

Unicode string (directory string)

2.5.5.12

64

Normal case-insensitive string using any Unicode characters

298

NT security descriptor

2.5.5.15

66

An octet string that contains a Windows NT/2000 security descriptor(SD)

3

SID string

2.5.5.17

4

An octet string that contains a Windows NT/2000 security identifier (SID)

8


TABLE 8.19 Syntaxes for Time Data Types

Syntax

attribute- Syntax

oMSyntax

Description

Count in Base Schema

UTC time string

2.5.5.11

23

Time-string format defined by ASN.1 standards. See standards ISO 8601 and X.680 for more information.8 UTC, or Coordinated Universal Time, is roughly the same as GMT, or Greenwich Mean Time. This syntax uses only two characters to represent the year.

4

Generalized time string

2.5.5.11

24

Time-string format defined by ASN.1 standards. See standards ISO 8601 and X.680 for more information.8 This syntax uses four characters to represent the year.

6


TABLE 8.20 Syntaxes for Reference Data Types

Syntax

attribute- Syntax

oMSyntax

Description

Count in Base Schema

DN (distinguished name or DN String)

2.5.5.1

127

Distinguished name of an object in the directory. If the target object is moved or renamed, Active Directory updates the DN attribute accordingly.

92

DN with binary (DN with octet string)

2.5.5.7

127

This syntax stores a distinguished name along with some binary data. Active Directory keeps the DN up-to-date. The format is B:hex digit count:bytes as hex:DN (e.g., B:6:F12A4B:someDN).

4

OR name

2.5.5.7

127

An X.400 syntax (related to e-mail addresses).

0

Replica link

2.5.5.10

127

Syntax that repsFrom and repsTo attributes use to control replication. The corresponding attributes contain things such as the up-to-date vector of a replication partition.

2

Presentation address

2.5.5.13

127

OSI application entities use presentation addresses to address other application entities. See RFCs 1278 and 2252 and ISO DIS 7498-3 for more information.

1

DN with Unicode string

2.5.5.14

127

This syntax stores a distinguished name along with a string. Active Directory keeps the DN up-to-date. The format is S:character count:string:DN (e.g., S:5: hello:someDN).

0

Access point DN

2.5.5.14

127

An X.400 distinguished name.

0


All seven syntaxes in Table 8.20 have oMSyntax = 127, which means that they must have oMObjectClass also defined. The latter attribute distinguishes them, because some of them have identical attributeSyntax and oMSyntax. We list the oMObjectClass values in Table 8.21.

TABLE 8.21 oMObjectClass Values for "127" Syntaxes

Syntax

attributeSyntax

oMSyntax

oMObjectClass (hexadecimal)

DN

2.5.5.1

127

2B0C0287731C00854A

DN with binary (DN with octet string)

2.5.5.7

127

2A864886F7140101010B

OR name

2.5.5.7

127

56060102050B1D

Replica link

2.5.5.10

127

2A864886F71401010106

Presentation address

2.5.5.13

127

2B0C0287731C00855C

Access point DN

2.5.5.14

127

2B0C0287731C00853E

DN with Unicode string

2.5.5.14

127

2A864886F7140101010C


Multivalued Attributes

Each multivalued attribute can have up to 850 values, except for linked multivalued attributes, such as group members, which can have 5,000 values (i.e., group members).

When one value is added, deleted, or modified, the whole attribute is replicated to other domain controllers. Therefore, it is not a good idea to make multivalued attributes too large. Another reason to favor relatively small multivalued attributes is that when you read the attribute, all values are normally returned together.

The values are returned in random order; if you write a program or script to read the values, you cannot depend on the order.

Even though returning all values of a multivalued attribute is the normal behavior, LDAP allows specifying the range of values. This is explained in Chapter 6.

Searches

Some attributes are indexed, which allows fast searches based on those attributes, and some attributes are part of the global catalog. The indexed and global catalog attributes are defined with two attributeSchema attributes, which are described in Table 8.22.

TABLE 8.22 Search Attributes of an attributeSchema Object

Name

Syntax

Multi- valued

Description

LDAP Display Name Attribute Example

SearchFlags

Enumeration

No

The bits in this number define whether the corresponding attribute is indexed and how it is treated in searches. (Table 8.23 describes the bits.)

9

isMemberOf- Partial- AttributeSet

Boolean

No

If True, the corresponding attribute is part of the global catalog and consequently is replicated to all global catalog servers.

True


NOTE

Indexing and global catalog membership are per-attribute settings, not per-class settings. In other words, if the givenName attribute is indexed, this will apply to any class that happens to use givenName.

NOTE

You might wonder how it is possible that the member attribute is part of the global catalog (isMemberOfPartialAttributeSet is True), but only universal group members appear in the global catalog, whereas global and domain local group members don't. The answer is that Microsoft hard-coded this difference to Active Directory; that is, group membership doesn't care about isMemberOfPartialAttributeSet attribute.

SearchFlags is a bit-field attribute. It contains 32 bits, 5 of which have a meaning. Those 5 bits are the least significant ones, which means that they are the rightmost bits if you use Windows Calculator to convert a decimal number to binary. The bits are described in Table 8.23. The bit value "1" means True—that is, the setting is on.

TABLE 8.23 SearchFlags Bits

Bit from Right

Hex Value

Description

Count in Base Schema

1

1

If set, the attribute is indexed.

64

2

2

If set, the attribute is indexed over container and attribute.

0

3

4

The attribute is part of the Ambiguous Name Resolution (ANR) set, which is explained in the "Ambiguous Name Resolution" section. This bit should be used in conjunction with the first bit.

8

4

8

The attribute is preserved when an object is changed to a tombstone (i.e., "deleted"). All attributes without this bit are deleted.

24

5

10

If set, the attribute is copied when duplicating a user with the Users and Computers snap-in.

33


Ambiguous Name Resolution

Ambiguous Name Resolution (ANR), which is mentioned in Table 8.23, needs a few words of explanation. ANR is an LDAP feature that allows using a simple LDAP filter instead of a complex filter in certain LDAP searches. You can use ANR manually with LDAP filters (discussed in Chapter 6). Also, when you perform a search with Windows 2000 Address Book, it will use ANR for you.

The following eight attributes are part of the ANR set in the base schema:

  • displayName

  • givenName

  • legacyExchangeDN

  • name (RDN)

  • physicalDeliveryOfficeName (user properties, General tab, Office)

  • proxyAddresses

  • sAMAccountName (user properties, Account tab, Pre-Windows 2000 name)

  • sn (Surname)

ANR gives flexibility in two ways:

  • Only a partial match is required from the beginning of the text. If you search for "Brown," you will get both "Brown" and "Brownfield."

  • The search is performed on several attributes (those eight just listed). If you search for "Brown," it can be the starting part of not only the surname (last name), but also displayName, sAMAccountName, or any of the other five attributes.

If you search for two words, ANR works as just described, with one addition. It will also try if the words are "first name—last name" or "last name—first name." If you want to find Jack Brown, you can type either "jac bro" or "brow jack." The corresponding LDAP filters would be

(anr=jac bro)
(anr=brow jack)

It is possible to suppress the first name/last name functionality and/or the last name/first name functionality. You do this by modifying the same dSHeuristics attribute that is used to enable the List Object permission. We explained the procedure in Chapter 4 in the "Enabling and Using the List Object Permission" section.

Miscellaneous Characteristics for Attributes

Most of the miscellaneous attributeSchema attributes are also classSchema attributes. Because we described the classSchema attributes when discussing classes, there is no need to repeat the discussion of the following attributes:

  • nTSecurityDescriptor
  • isDefunct
  • objectClass
  • objectCategory
  • schemaFlagsEx

One new attribute, isEphemeral, is not used, so we are left with only two attributes to address here: systemOnly and systemFlags. Although those two attributes also appeared in the discussion of classes, they have some new aspects. Table 8.24 describes the attributes systemOnly and systemFlags, and Table 8.25 continues the description of the systemFlags.

TABLE 8.24 Miscellaneous Attributes of an attributeSchema Object

Name

Syntax

Multi- valued

Description

LDAP Display Name Attribute Example

systemOnly

Boolean

No

If True, you can set the value for the attribute only when creating an object. Afterward, only the DSA can change the value.

False

systemFlags

Integer

No

The bits in this number define things such as whether the corresponding attribute is replicated or constructed. (Table 8.25 describes the bits.)

16


TABLE 8.25 SystemFlags Bits

Bit from Right

Hex Value

Description

Count in Base Schema

1

1

If set, the attribute is not replicated from one domain controller to another.

39

2

2

This is an undocumented bit used by the system.

43

3

4

If set, the attribute is constructed. It is built from other attributes and not stored in the schema on disk.

22

5

10

If set, the attribute belongs to category 1 (part of the base schema); otherwise, it belongs to category 2 (an extension).

849

28

800 0000

This is an undocumented bit used by the system.

21


NOTE

For some peculiar reason, 14 of the base schema attributes and two of the classes are not marked to belong to category 1. Therefore, you could deactivate them, for example, even though you are not supposed to be able to do that for category 1 attributes or classes.

AttributeSchema Object Property Pages

There is only one property page for attributeSchema objects in the Schema Manager snap-in, and there is no Security tab. Figure 8.17 shows the property page for the object lDAPDisplayName.

Of the 34 attributeSchema attributes that we have discussed in this section, Figure 8.17 shows the following 11, with the values in parentheses (we didn't count showInAdvancedViewOnly). To see all of the attributes, you need ADSI Edit.

Figure 8.17 With the Schema Manager snap-in you can see the attributes of various attributes, such as lDAPDisplayName.

  • lDAPDisplayName ("lDAPDisplayName")

  • adminDescription ("LDAP-Display-Name")

  • cn ("LDAP-Display-Name")

  • attributeID ("1.2.840.113556.1.2.460")

  • attributeSyntax, oMSyntax, oMObjectClass ("Unicode String")

  • rangeLower ("1")

  • rangeUpper ("256")

  • isSingleValued ("This attribute is single-valued")

  • showInAdvancedViewOnly (Note that even though checking the "Show objects of this class while browsing" box sets this attribute to False, it doesn't have any practical meaning.)

  • isDefunct ("Deactivate this attribute" not checked)

  • searchFlags ("Index this attribute in the Active Directory" checked, "ANR" not checked, "Attribute is copied when duplicating a user" not checked)

  • isMemberOfPartialAttributeSet ("Replicate this attribute to the Global Catalog" not checked)

  • + Share This
  • 🔖 Save To Your Account