Friday, November 30, 2007

Tuesday, November 13, 2007

How to Change System Only Attributes

Using ADSearch allows you to extract object properties, however, not all properties of an object are changable. If you need to change Active Directory object properties that are set as system only there is a registry key setting that will allow you to set these properties.

I strongly recommend caution when changing system only properties.

By adding a registry key to the PDC Emulator or FSMO DC the registry key will allow you to change system-only attributes.

Key: HKEY_LOCAL_MACHINE
Path: System\CurrentControlSet\Services\NTDS\Parameters
Value name: Allow System Only Change
Data type: REG_DWORD
Value data: 1

Tuesday, November 06, 2007

AD Group Scope Basics

Security groups or a distribution groups, are characterized by a scope that identifies how they are applied in the domain tree or forest.

There are three group scopes: universal, global, and domain local.

Universal Groups (type - 2147483640)
Universal groups can include other groups and accounts from any domain in the domain tree or forest and can be assigned permissions in any domain in the domain tree or forest.

Global Groups (type - 2147483646)
Global groups can include other groups and accounts only from the domain in which the group is defined and can be assigned permissions in any domain in the forest.

Domain Local Groups (type - 2147483644)
Domain local groups can include other groups and can be assigned permissions only within a domain.

Functionality Scope
When the domain is set to Windows 2000 native or Windows Server 2003, members of universal groups can include accounts, global groups, and universal groups from any domain.
Global groups can include accounts and global groups from the same domain. Domain local scope can include accounts, global groups, and universal groups from any domain, as well as domain local groups from the same domain.

Groups can be added to other groups and assigned permissions in any domain. Groups can be added to other domain local groups and assigned permissions only in the same domain.

Groups can be converted to domain local scope, to global scope, as long as no other universal groups exist as members. Groups can be converted to universal scope, as long as the group is not a member of any other group with global scope. Groups can be converted to universal scope, as long as the group does not have as its member another group with domain local scope.

When the domain level is set to Windows mixed, security universal groups cannot be created. Global groups can include accounts from the same domain. Domain local groups can include accounts and global groups from any domain.

Domain Local Scope Use
Groups with domain local scope help you define and manage access to resources within a single domain.

Global Scope Use
Use groups with global scope to manage directory objects that require daily maintenance, such as user and computer accounts because groups with global scope are not replicated outside of their own domain.

Universal Scope Use
Use groups with universal scope to consolidate groups that span domains. Add the accounts to groups with global scope and nest these groups within groups having universal scope. Any membership changes in the groups having global scope do not affect the groups with universal scope.
Groups with universal scope should not be changed frequently, since any changes to these group memberships cause the entire membership of the group to be replicated to every global catalog in the forest.

Changing Group Scope
Global to universal. This is only allowed if the group you want to change is not a member of another global scope group.
Domain local to universal. This is only allowed if the group you want to change does not have another domain local group as a member.
Universal to global. This is only allowed if the group you want to change does not have another universal group as a member.
Universal to domain local. No restrictions for this operation.

Friday, November 02, 2007

Clean up Active Directory

Over time, user and computer accounts become obsolete and need elimination. ADSearch helps identify all inactive or disabled users and computers in Active Directory. Based on your company policy you can delete, disable, enable or move these accounts.

Enhance Active Directory Safety and Performance.

You can run Adsearch to search logonCount for users and computers and report only accounts that never logged on to locate inactive user or computer accounts and then disable, delete or move these accounts.

For detailed reports using Active Directory lastLogon feature, download and use Winzero Computer2User to evaluate every DC in your domain for the true last logon time of any user.

A reliable Active Directory infrastructure should always ensure that the existing accounts are enabled and obsolete accounts are disabled or deleted, for optimum productivity and security.

Thursday, October 25, 2007

Deleting Mailbox-Enabled Users

If you choose to delete a mailbox-enabled user or group, the mailbox in the message store of the Exhange 200x server will not be disabled. To disable the mailbox, you should clear the following attributes in Active Directory before deleting the account:

Attributes to Clear

homeMDB,
mail,
mailNickname,
homeMTA,
legacyExchangeDN,
msExchHomeServerName,
msExchMailboxGuid,
msExchPoliciesIncluded,
proxyAddresses,
textEncodedORAddress

By clearing these 9 attributes from the user properties before deleting the user account, Active Directory will notify the Exchange 200x server that mailbox attached to this account should be disabled.

Wednesday, October 17, 2007

userPrincipalName (User-Principal-Name)

The userPrincipalName is a single-valued and indexed property that specifies the user principal name (UPN). The UPN is an Internet-style login name for the user. The UPN is shorter than the distinguished name and easier to remember. The point of the UPN is to consolidate the e-mail and logon namespaces so that the user need only remember a single name.

The UPN as the Preferred Logon Name

Users should use their UPNs to log on to the domain. At logon time, a UPN is validated first by searching the local domain, then the global catalog.
By convention, the UPN should map to the user's e-mail name.

The UPN can be assigned, but is not required. Once assigned, the UPN is unaffected by changes to other properties of the user object. If a parent domain was renamed or a domain was moved the user can keep the same login name, even if the directory is radically restructured.

The UPN Name Structure

The UPN must be unique among all security principal objects within the directory forest.
The user principal name has two parts: the UPN prefix (the user account name) and the UPN suffix (a DNS domain name). The parts are joined together by the @ (at sign) to complete the UPN.

The UPN can consist of any name for the user (such as the sAMAccountName) and the domain tree name or an email domain name

Sample User Principal Name:

name@domain.com, Email.Name@emailAddress.com

Common Active Directory Attributes, Syntaxes, and Meanings

The following contains a number of commonly used Active Directory attributes, their meanings, their syntax, and what objects contain them in the default Active Directory schema:

accountExpires (user)
The date which a user account will expire. This attribute takes the form of a long (64 bit) integer. To convert this value into a textual date use the ADSearch Convert function.

canonicalName (all objects)
A type of name for an object which takes the form of "domain.com/container/container/object". This style of name is very human readable. This attribute takes the form of a string.

cn (user, group, computer, contact)
The uplevel name of an object. It is the leaf part of a distinguishedName (for example, the "cn=joe" of "cn=joe,ou=someou,dc=domain,dc=com".)

dc (domainDNS)
The uplevel name of a domain. It is the leaf part of the distinguished name of the domain (for example, the "dc=domain" of "dc=domain,dc=com".)

distinguishedName (all objects)
This is the distinguished name of the object. It represents the full path to an object (without the server and provider) in the directory. This attribute takes the form of a single valued string. If you are searching the active directory, this attribute cannot be used as a key to search on. This is because it is a generated attribute (that is, it is generated everytime it is asked for).

isCriticalSystemObject (all objects)
This attribute specifies whether an object is critical for the operation of Active Directory. This attribute takes the form of a Boolean value. If its value is true, the object is critical to Active Directory and is not deletable.

logonHours (user)
The times which a user is allowed to log on. This attribute takes the form of an octet string (a sequence of hexadecimal characters with each set of two characters representing one byte.) To convert this binary data into a more meaningful set of data, use the ADSearch Convert function.

member (group)
The objects which are members of the group. This attribute takes the form of a multi-valued string, with each element being the distinguished name of a member. If the member is a Foreign Security Principal, the distinguished name will be in the form "CN=sid", where sid is the SID of the member.

objectCategory (all objects)
Represents the path to the schema class of which an object is an instance. This attribute takes the form of a single valued string. If searching for objects, it is recommended that this be used instead of the objectClass, as it is an indexed attribute and replicated to the Global Catalog. Note that the whole path need not be used to search on this attribute, rather only the cn of the class (for example, person for user and contact, and organizational-unit for OUs.)

objectClass (all objects)
Represents the inheritance hierarchy of an objects class. This attribute takes the form of a multi-valued string.

objectGUID (all objects)
A GUID which uniquely identifies an object within the directory. This attribute takes the form of a raw binary string, with each set of two characters representing one byte of binary data. To convert the raw binary data that is retrieved from this attribute to a more readable or useful form, use the ADSearch Convert function.

objectSid (all security principals)
Contains the security identifier of an object. This SID can be used to represent an object in various places on the network (Active Directory, File System ACLs, or anywhere else users are added to ACLs.) This attribute takes the form of a raw binary string, with each set of two characters representing one byte of binary data. To convert this binary value into a more useful textual value use the ADSearch Convert function.

ou (organizationalUnit)
The uplevel name of an organizational unit. It is the leaf part of the distinguished name of an organizational unit (for example, the "ou=someou" of "ou=someou,dc=domain,dc=com").

sAMAccountName (user, computer, group)
The downlevel name of the object. This is the name that will be seen by downlevel administrative tools and other pre-windows 200x tools. This attribute takes the form of a single valued string.

userAccountControl (user)
A set of bit flags defining certain properties of a user. This attribute takes the form of a 32-bit integer. This attribute is a combination of the following bit values:
Value Description
1 The logon script will be executed.
2 The user account is disabled.
8 A home directory is required.
16 The account is locked out.
32 The account does not require a password.
64 Account is not allowed to change password.
512 The account is a typical user account.
65536 The account password never expires.

Monday, October 15, 2007

Convert Raw AD Properties

Adsearch v3.0x features a conversion tool to convert from raw unreadable active Directory properties to readable properties.

GUIDRaw
Convert the raw form of a GUID to The textual form of a GUID.

SIDRaw
Convert the raw form of a SID to The textual form of a SID.

LHRaw
Convert the raw form of hours representation such as the attribute logonHours to the textual form of hours representation such as logonHours. Example: "1-24<-><->8-17<->...."

IRawDate
Convert the raw form of a date in integer format such as accountExpires to the textual form of a date.

Quick How To

Adsearch 3.0x and up allows you to quickly copy and paste the raw information into the conversion tool and convert it to a readable form.

Example:
To get the last password reset date and time in a readable format.

From the menu select Search Active Directory; select the domain and the bindserver to logon to.
Select ObjectType: user
Select SearchBy: name
Select SearchResults: pwdLastSet
Enter ALL for Refine Search

Once the results for all users are returned and the last password set looks like: 128153342196114592, double click an account name. In the popup Copy to Clipboard Window, select 128153342196114592.

Once this is done, select ADSearch Tools from the menu and choose Convert Raw Active Directory Data.

Select the domain to convert the information and choose Convert Raw Date to Textual Date
In the Enter Raw Date popup, right click the textbox and paste the raw date from the clipboard.

The raw date will convert to: 02/07/07@11:03:39

With ADsearch, you can use this method to convert raw Dates, SIDs, GUIDs and compound Times

Monday, July 09, 2007

lastLogon

Because the lastLogon attribute is not replicated in Active Directory, a different value can be stored in the copy of Active Directory on each Domain Controller. The largest value that is retrieved is the true last logon time for that user.

The lastLogon attribute is stored in Active Directory as Integer8 (8 bytes). This means it is a 64-bit number. This value represents the number of 100 nanosecond intervals since 12:00 AM January 1, 1601. The date represented by this number is in Coordinated Universal Time (UTC). It must be adjusted by the time zone bias in the local machine registry to convert to local time.

lastLogonTimestamp

Ok, here is how it works in Windows 2003 for the new last logon attribute.
One of the new attributes in Windows 2003 is lastLogonTimestamp which can be used to retrieve the last logon time for users, good so we have a new attribute to use! Sounds easy, right?

But the lastLogonTimestamp is not always showing the truth since it is only replicated every 14 days...

Simplifying Matters

So instead of writing VBScripts and performing calculation hurdles, why not download Winzero's Computer2User v3.00 or Winzero Domain Monitor solutions at:

http://www.winzero.ca/downloads.htm

and just use these solutions:

Computer2User version 3.0x will report the last domain logon for all users* from any selected DC, or the last local computer logon for all users by server or workstation.

DomainMonitor version 2.0x will report the last domain logon for all users* from all DCs by collection date.

*note "users" in Active Directory will return both users accounts and computer accounts because AD sees both as accounts.

Friday, August 18, 2006

User Properties and Return Values

Adsearch User properties and return values that can be returned for a user. The first indicates the names that are indicated on the MMC GUI Users and Computers and the name associated to Active Directory attribute.

The value returned may be a string (textual), multistring (list of textual entries), boolean (True or false, 0 or 1) , binary, or a date.

First name - givenName Single value string
Initials - initials Single value string
Last name - sn Single value string
Display name - displayName Single value string
Description - description Single value string
Office - physicalDeliveryOfficeName Single value string
Telephone number - telephoneNumber Single value string
Other telephone number - otherTelephone Multi value string
Email - mail Single value string
Web page - wWWHomePage Single value string
Other web page url Multi value string

Address:
Street - streetAddress Single value string
P.O. Box - postOfficeBox Single value string
City - l (letter 'L') Single value string
State/province - st Single value string
Zip/Postal Code - postalCode Single value string
Country/region - co Single value string

Account:
User logon name - userPrincipalName Single value string
User logon name (pre W2K) - samAccountName Single value string
Logon Hours - logonHours (see Note 1 below this table) Single value string
Log On To - userWorkstations Multi value string
Account locked out ACT-LockedOut (see Note 2 below this table) "true" or "false"
User must change password at next logon ACT-PassMustChange (see Note 2 below this table) "true" or "false"
User cannot change password ACT-PassNoChange (see Note 2 below this table) "true" or "false"
Password never expires ACT-PassNoExpire (see Note 2 below this table) "true" or "false"
Store password using reversible encryption ACT-ReverseEncrypt (see Note 2 below this table) "true" or "false"
Account is Disabled ACT-AccountDisabled (see Note 2 below this table) "true" or "false"
Smart card is required for interactive logon ACT-SmartCardReq (see Note 2 below this table) "true" or "false"
Account is trusted for delegation ACT-AccountTrusted (see Note 2 below this table) "true" or "false"
Account is sensitive and cannot be delegated ACT-AccountSensitive (see Note 2 below this table) "true" or "false"
Use DES encryption types for this account ACT-UseDES (see Note 2 below this table) "true" or "false"
Do not require Kerberos pre-authentication ACT-KerberosNotReq (see Note 2 below this table) "true" or "false"

Account expires accountExpires date string

1. Output for logonHours is in the textual form of hours representing a 7-day period. The string is divided into 7 slots, each slot representing a day and indicating a mix of hour ranges and/or single hours. Example of allowing logon 9am to 6pm, Monday through Friday, and between 1pm and 2pm Saturday: "<->10-18<->10-18<->10-18<->10-18<->10-18<->14", where "<->" is the delimiter.

2. Most of the 'ACT' attribute names are stored as bit flags in the Active Directory integer attribute userAccountControl. They are uniquely identified here with artificial names to make it easier to get their values.

Profile:
Profile path - profilePath Single value string
Logon script - scriptPath Single value string
Local path - homeDirectory Single value string
Connect - homeDrive Single value string home
Directory (The Connect and To fields created the remote path when applied in MMC Users and Computers) Single value string

Telephones:
Home - homePhone Single value string
Other Home - otherhomePhone Multi value string
Pager - pager Single value string
Other Pager - otherPager Multi value string
Mobile - mobile Single value string
Other Mobile - otherMobile Multi value string
Fax - facsimileTelephoneNumber Single value string
Other Fax - otherfacsimileTelephoneNumber Multi value string
IP Phone - ipPhone Single value string
Other IP Phone - otheripPhone Multi value string Notes info Single value string

Organizations:
Title - title Single value string
Company - company Single value string
Department - department Single value string
Manager - manager Single value string
Direct Reports - directReports Multi value string

Member Of:
Member Of - memberOf Multi value string

Dial-in:
Remote Access Permission msNPAllowDialin "true" or "false"
Callback Options:No Callback/ Set by caller/Always callback to ACT-Callback (see note below this table) "false" means callback is disabled."true" means callback is enabled and the callback number is set by the user."true555-1234" means callback is enabled and the callback number is pre-set.

The 'ACT-Callback' attribute name above is uniquely identified here with an artificial name to make it easier to retrieve the value.

Object:
Fully qualified domain name of object - canonicalName Single value string
Created - whenCreated date string Modified whenChanged date string
Original USN - uSNCreated Single value string
Current USN - uSNChanged Single value string

Other:
SID - objectSID binary (Requies conversion from raw format)
GUID - objectGUID- binary (Requires conversion from raw format)

Friday, April 07, 2006

Object: user ~ MS Exchange Attributes

Once the Active Directory schema is extended by Microsoft Exchange 2000 or 2003, the user attribute will contain the following additional properties:

homeMDB
Here is where you set the MailStore

legacyExchangeDN
Legacy distinguished name for creating Contacts. In the following example, Guy Thomas is a Contact in the first administrative group of GUYDOMAIN: /o=GUYDOMAIN/ou=first administrative group/cn=Recipients/cn=Guy Thomas

mail
An easy, but important attribute. A simple SMTP address is all that is required billyn@ourdom.com

mAPIRecipient
- FALSE Indicates that a contact is not a domain user.

mailNickname
Normally this is the same value as the sAMAccountName, but could be different if you wished. Needed for mail enabled contacts.

mDBUseDefaults
Another straightforward field, just the value to:True

msExchHomeServer
NameExchange needs to know which server to deliver the mail. Example: /o=YourOrg/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=MailSrv

proxyAddresses
As the name 'proxy' suggests, it is possible for one recipient to have more than one email address. Note the plural spelling of proxyAddresses.

targetAddress
SMTP:@ e-mail address. Note that SMTP is case sensitive. All capitals means the default address.

showInAddressBook
Displays the contact in the Global Address List.

Monday, April 03, 2006

Object: group ~ Attribute: groupType

The groupType attribute returns the type of group. However the returned value is in RAW format. AdSearch conversion tool will convert the groupType result or for further refernence see the possible return values below:

-2147483646 ~ Global Security Group
-2147483644 ~ Local Security Group
-2147483643 ~ BuiltIn Group
-2147483640 ~ Universal Security Group

2 ~ Global Distribution Group
4 ~ Local Distribution Group
8 ~ Universal Distribution Group

ADSearch Objects

Winzero ADSearch for Active Dirctory enables IT Professionals using Microsoft Windows 200 and Wndows 2003 to search object property attributes in the Schema for the following objects:

- Users (user)
- Groups (group)
- Domains (domain)
- Organizational Units, OUs (organizationalUnit)
- Computers (computer)
- Published Printers (printQueue)
- Published Shares (volume)

Search queries and search results are based on ADSI LDAP property names