Hvad er Active Directory?



Relaterede dokumenter
IBM Network Station Manager. esuite 1.5 / NSM Integration. IBM Network Computer Division. tdc - 02/08/99 lotusnsm.prz Page 1

DET KONGELIGE BIBLIOTEK NATIONALBIBLIOTEK OG KØBENHAVNS UNIVERSITETS- BIBLIOTEK. Index

Status på det trådløse netværk

Serverteknologi I Project task list

Portal Registration. Check Junk Mail for activation . 1 Click the hyperlink to take you back to the portal to confirm your registration

MSI pakke til distribution af AutoPilot komponenter.

NT PDC Udarbejdet af Kenneth Dalbjerg

Windows system administration 1

Opsætning af Backup. Hvis programmet registreres korrekt vises nedenstående skærmbillede. Genstart herefter programmet.

Serverteknologi I * Projekt * Opgaveliste

Instruktioner i installation og afinstallation af Windows PostScript- og PCLprinterdrivere

Vejledning til at tjekke om du har sat manuel IP på din computer.

FairSSL Fair priser fair support

Opsætning af Backup. Dette er en guide til opsætning af backup med Octopus File Synchronizer.

Hosted CRM Outlook client connector setup guide. Date: Version: 1. Author: anb. Target Level: Customer. Target Audience: End User

Filr: Næste generation af Fildeling. Flemming Steensgaard

Aktivering af Survey funktionalitet

Hosted CRM Outlook client connector setup guide. Date: Version: 1. Author: anb. Target Level: Customer. Target Audience: End User

Sektornet VPN. Opsætning af Novell 4.1x server og klient på. Windows 2000/NT/XP

Vina Nguyen HSSP July 13, 2008

Project Step 7. Behavioral modeling of a dual ported register set. 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU 1

Help / Hjælp

FairSSL Fair priser fair support

Opsætning af MobilePBX med Kalenderdatabase

Online kursus: Content Mangement System - Wordpress

Privat-, statslig- eller regional institution m.v. Andet Added Bekaempelsesudfoerende: string No Label: Bekæmpelsesudførende

FairSSL Fair priser fair support

Installation af Oracle 10g Release 2 database

SPECIALTRYKKERIETS KUNDE WEBPORTAL KOM GODT I GANG

Serverteknologi I Projektopgave. Mål for kurset

MOC On-Demand Identity with Windows Server 2016 [20742]

Vores mange brugere på musskema.dk er rigtig gode til at komme med kvalificerede ønsker og behov.

Backup Applikation. Microsoft Dynamics C5 Version Sikkerhedskopiering

how to save excel as pdf

Vejledning til Teknisk opsætning

FairSSL Fair priser fair support

Boligsøgning / Search for accommodation!

Brug sømbrættet til at lave sjove figurer. Lav fx: Få de andre til at gætte, hvad du har lavet. Use the nail board to make funny shapes.

BACK-END OG DATA: ADMINISTRATION HVAD ER DE NYE MULIGHEDER MED VERSION 7.1? STEFFEN BILLE RANNES, 4. FEBRUAR 2015

E-PAD Bluetooth hængelås E-PAD Bluetooth padlock E-PAD Bluetooth Vorhängeschloss

Accessing the ALCOTEST Instrument Upload Data - NJSP Public Website page -

PID2000 Archive Service

Velkommen. Backup & Snapshot v. Jørgen Weinreich / Arrow ECS Technical Specialist

Vejledning. Opsætning af Trio Web Vers 2.0 feb. 2010

QUICK START Updated:

Grundopsætning af router.

Netværk & elektronik

QUICK START Updated: 18. Febr. 2014

Vejledning til brug for udrulning med Group Policy (fra Windows Server 2003)

CHAPTER 8: USING OBJECTS

Exploring Subversive Eclipse SVN Team Provider

Ruko SmartAir. Updater installation

IIS 8.0 & 8.5 & 10.0 SSL Administration

Engelsk. Niveau D. De Merkantile Erhvervsuddannelser September Casebaseret eksamen. og

Projektopgave Operativsystemer I

Agenda. Muligheder for anvendelse. Komponenter. Features. Restore muligheder. DR og TSM integration. Repository. Demo. Spørgsmål

MOC On-Demand Administering System Center Configuration Manager [ ]

WINDCHILL THE NEXT STEPS

Userguide. NN Markedsdata. for. Microsoft Dynamics CRM v. 1.0

Engelsk. Niveau C. De Merkantile Erhvervsuddannelser September Casebaseret eksamen. og

Velkommen på kursus hos Microworld

Shooting tethered med Canon EOS-D i Capture One Pro. Shooting tethered i Capture One Pro 6.4 & 7.0 på MAC OS-X & 10.8

VPN VEJLEDNING TIL MAC

Installation og brug af DMUs VPN klient Installation and use of DMU s VPN client

KUNDE-WEBPORTAL KOM GODT I GANG

UPLOAD. Af Database og Website til Skolens Server

The X Factor. Målgruppe. Læringsmål. Introduktion til læreren klasse & ungdomsuddannelser Engelskundervisningen

DPR lokal persondatabase. Checkliste for CPR migrering

Installation af Bilinfo på Windows

Individuel specialisering

HELLO FAQ DANSK RACKPEOPLE

Hosted Exchange. Setup guide for clients & mobile devices. Date: Version: 15. Author: SBJ/ANB. Target Level: Customer

Applikations Virtualisering. Anders Keis Hansen

Transformering af OIOXML til OIOUBL og OIOUBL til OIOXML

User Manual for LTC IGNOU

IPTV Box (MAG250/254) Bruger Manual

Basic statistics for experimental medical researchers

Vejledning til Autodesk Account - Subscription

SAS USER FORUM DENMARK 2017 USER FORUM. Rune Nordtorp

MSE PRESENTATION 2. Presented by Srunokshi.Kaniyur.Prema. Neelakantan Major Professor Dr. Torben Amtoft

Contents. John Have Jensen Mercantec 2011

EasyIQ Opdatering > 5.4.0

TM4 Central Station. User Manual / brugervejledning K2070-EU. Tel Fax

FairSSL Fair priser fair support

Hyper-V på Windows 8 64 Bit. Indhold. Vejledning i brug af Hyper-V på en Windows 8 maskine

2013 SP1. Konfiguration af koncernindblik. Configuration Guide

PDFmaps på smartphones

The purpose of our Homepage is to allow external access to pictures and videos taken/made by the Gunnarsson family.

DET KONGELIGE BIBLIOTEK NATIONALBIBLIOTEK OG KØBENHAVNS UNIVERSITETS- BIBLIOTEK. Indhold

Hosted Exchange. Setup guide for clients & mobile devices. Date: Version: 15. Author: SBJ/ANB. Target Level: Customer

Terese B. Thomsen 1.semester Formidling, projektarbejde og webdesign ITU DMD d. 02/

Sådan logger du ind... 2 Hvilke mapper kan du tilgå... 3 Visning af eksempel af en fil... 5 Sådan deler du en fil... 7 Se hvad du deler med andre...

Securing Linux with RACF Alan Altmark z/vm Development IBM Endicott

Vejledning til Autodesk Account - Subscription

Projektoplæg - AMU kursus Netteknik - Server - Videregående

DK - Quick Text Translation. HEYYER Net Promoter System Magento extension

4000 Generation Vejeceller Single Point Vejecelle SPSXL. Applikationer. Unikke Fordele

PDFmaps på smartphones

United Nations Secretariat Procurement Division

WIKI & Lady Avenue New B2B shop

Transkript:

Hvad er Active Directory? Active Directory er Microsofts implementering af en netværk objects database. Sådanne databaser er formelt beskrevet i X.500 standarden som værende en central database, der indeholder information (placering, rights) om netværkets objekter for let søgning og rettigheds udøvelse. Andre eksempler på en Directory Service kunne være Novells NDS (Novell Directory Service) og Banyan Vines StreetTalk. Denne directory database (eller "telefonbog" over netværks ting om man vil) er fysisk i Windows 2000 miljø, i en fil der hedder NTDS.DIT som ligger på alle Windows 2000 domæne controllere. Det vil altså sige at alle "objekter" (brugere, printere, DFS drev, etc etc) er repræsenteret i denne database og deres sikkerheds rettigheder er skrevet til denne database. Men hvad er fordelen ved dette? Hvis jeg som bruger i et Windows 2000 netværk vil finde en printer i London kan jeg via active directory søge efter alle farve printere fra HP der er placeret i London. Hvis AD er korrekt opsat og printerne er repræsenteret i AD vil man som bruger få disse informationer sendt tilbage og man kan derefter tilkoble sig printeren eller sende jobs til den. Active Directory har som Microsoft har implementeret den, en struktur der indeholder forests og tree's. En skov (forest) er en mængde træer der har samme "regler" for oprettelse af objekter. Et træ er en struktur af domæner. Et eksempel på et lille træ kunne være microsoft.com. Det er i dette tilfælde kun et led. En gren under dette træ kunne være support. Stien på support vil dermed være support.microsoft.com. Umiddelbart tænker man på DNS når man ser disse strenge og AD er da også baseret på DNS til navneopløsning. Hvad er X.500? X.500 er en OSI standard, der kaldes "The Directory: Overview of concepts, models and services", det vil sige en overordnet beskrivelse af katalogtjenster. X.500 blev foreslået til at opbygge registre over adresser til elektronisk post i det gamle X.400 system, men i dag har den nok mest betydning som inspiration til private directory services, f.eks. Microsoft ADS, Novell NDS og Banyan StreetTalk. Der findes også en TCP/IP-variant kaldet LDAP, Lightweight Directory Access Protocol. Hvad er NDS? NDS er Novell Netware s bud på en directory service, og er Novells pendant til Microsoft Active Directory. Første version udkom allerede tilbage i 1993, og med seneste version (Novell NDS edirectory 2000) er NDS således i 9. generation, hvor Active Directory endnu er i første (ny version følger dog i.net-server). Det overordnede formål med en directory services i alt almindelighed er kort sagt at opnå universel og forenklet adgang til alle ressourcer i et netværk ved hjælp af en fælles struktur og centraliseret opbevaring. Med ressourcer menes printere, filer, databaser osv., og det er altså et spørgsmål om at få sammenkoblet brugerne med disse ressourcer. Det i sig selv er jo ikke nogen ny idé, men det, der gør dette til noget specielt er, at man med directory services ikke længere begrænser sig til en flad struktur, men derimod har mulighed for at afspejle virksomhedens organisation med en

hierakisk opbygning. Den stadig stigende informationsbyrde i netværkene gør, at dette kan være en stor fordel for systemadministratoren, da det letter hans arbejde, og er samtidig med til at lette overblikket. NDS er modelleret udfra X.500 standarden. X.500-specifikationen er et sæt af protokoller, der er blevet vedtaget som formelle standarder af ITU og ISO i et forsøg på at definere en standard for, hvordan man sikrer adgang, distribution og administration til directory-informationer. Men standarden blev på grund af de mange grundige overvejelser og detaljeringsgrad så kompleks og omfattende, at det har skræmt mange væk. Men grundlæggende er X.500 så velovervejet og fornuftig, at producenterne har taget den til sig i større eller mindre grad. Hvad er Vines? Vines betyder Virtual Network System og er et UNIX-baseret netværksoperativsystem til større netværk lavet af firmaet Banyan. Serverdelen kører som en proces på en UNIXmaskine, men alle platforme og IP, IPX, SNA samt en række WAN-forbindelser understøttes. VINES directory service kaldes StreetTalk, og den er stadig den nemmeste at bruge, selv om den er blevet efterlignet af Microsoft ADS og Novell NDS. Hvad er DNS? DNS (Domain Name System) er det system der oversætter et navn, som mennesker har en chance for at huske til en IP-adresse. Det kunne fx være http://www.net-faq.dk/, som af DNS oversættes til IP-adressen: [193.88.12.35]. Hvis adressen er registreret i en "reverse lookup zone" kan IP-adressen oversættes tilbage til DNS navnet, det kaldes "reverse DNS lookup" eller blot r-dns. DNS består af to dele, en server og en resolver. Serveren holder informationen om hvilke DNS-navne der svarer til hvilke IP-adresser. Resolveren er den software på klienten, som spørger serveren efter informationen. Et DNS navn består af en host (www) og et domæne (net-faq.dk). Domæner er unikke og registreres i globale databaser. Mere om dette i afsnittet om TLD. Figur: DNS hierarki eksklusiv nationale domæner [www.lucent.com] På en del operativsystemer er en "resolver" indbygget og hedder nslookup. Hvis operativsystemet ikke indeholder funktionen kan man istedet benytte online tjenester eller downloade små gratis (freeware) programmer.

Active Directory Programming The primary purpose of this page is to give you a jump start on Active Directory programming. For more detailed programming topics, please visit the above link. For quick illustrations and better reading, the samples are in Visual Basic. For Visual C++ programmers, the Active Directory Programmer's Guide provides plenty of C++ samples. Requirements You must have Windows 2000 Active Directory Server running. If your client does not use Windows 2000 or higher, you must install ADSI 2.5 or higher. If your client does use Windows 2000, you don't need to install ADSI 2.5. What do I lose if I don't have a Windows 2000 client? You can't use serverless binding. You can't use Kerberos, or Kerberos signing/sealing. Name translate (IADsNameTranslate) is not available. IADsADSystemInfo is not available. With the upcoming DS Client package for Windows 95/Windows 98, these limitations will be removed. How do I... Browse Active Directory Bind Get to RootDSE Bind to a current domain Bind using alternate credentials Bind to the global catalog Bind to the Schema container Bind to the Configuration container Bind with GUID Bind with SID Who am I? Get/Modify data Get domain mode List attributes that are replicated to the global catalog List indexed attributes Get UPN Suffixes Display the canonical name Create an organizational unit Create a user Create a group Delegate an organizational unit Create a computer account Remove a subtree Perform an ambiguous name resolution (ANR) search List attributes used in ANR

Browsing Active Directory You can quickly browse the Active Directory using the ADSVW.EXE shipped with the SDK. If your client is Windows NT 4.0 or Windows 95/Windows 98, then you'll need to know the server name or domain DNS name that hosts Active Directory. Run ADSVW.EXE. Select File New. Type LDAP://yourServer. You can specify alternate credentials by checking Use Open Object, otherwise uncheck this option. If your client is Windows 2000, and you're authenticated by Active Directory, you do not need to specify the server name. Now you should be able to browse Active Directory. Getting to RootDSE The LDAP standard (RFC 2251) requires that all LDAP directories maintain a special entry, called the Root DS Entry, or Root DSE. This entry provides a set of standard operational attributes that the user can read to find out fundamental characteristics of the directory and the server. The Root DSE can also provide any number of vendorspecific attributes. One of the standard operational attributes is "defaultnamingcontext". This attribute contains the distinguished name (DN) of the root of the directory. In Windows 2000, this is the DN of the Domain container at the root of the current tree. By reading the defaultnamingcontext attribute from the Root DSE, you can discover what domain you are logged in to at run time. ADSI provides a special mechanism for binding to the root DSE: using the ADSpath "LDAP://RootDSE". VB: set myobj = GetObject("LDAP://RootDSE") VC: hr = AdsGetObject(L"LDAP://RootDSE", IID_IADs,(void **)&pdsobj); Write a program that reads the defaultnamingcontext attribute from the Root DSE to discover what domain you are logged into. Source code can be found in \samples\activedir\rootdse\vc Binding with an Alternate Credential ADSI binds to the directory using the credentials of the currently logged-in user. Sometimes you need to bind to a particular directory service using specific credentials, or using credentials that are different from those of the logged-in user. ADSI provides an interface and method to provide this functionality. The namespace object supports the IADsOpenDSObject interface, which has a single method, OpenDSObject. OpenDSObject takes as arguments the ADSpath of the object or subtree to bind to, the username, the password, and the authentication method. To obtain the IADsOpenDSObject interface, perform a default bind to "LDAP:".

VB: set dso = Getobject("LDAP:") set myobj = dso.opendsobject( adspath, username, password, ADS_SECURE_AUTHENTICATION) VC: hr = AdsGetObject(TEXT("LDAP:"),IID_IADsOpenDSObject,(void **)&pdsobj); HRESULT OpenDsObject(LPTSTR Path, LPTSTR User,lpszPAssword,LONG Auth,Idispatch** ppdispatch) Use ADS_SECURE_AUTHENTICATION for secured authentication (NTLM or Kerberos). Write a program that discovers the current domain, then bind to it with explicit credentials. Source code can be found in \samples\activedir\rootdse\vc. Binding to a Current Domain You can bind the Active Directory current domain using the entry found in the RootDSE. Domain information is shared only in that domain. Example: Set rootdse = GetObject("LDAP://RootDSE") Get domain = GetObject("LDAP://" & rootdse.get("defaultnamingcontext") ) Binding to the Schema Container You can bind to the Active Directory Schema container using the entry found in the RootDSE. Schema information is shared across the forest. Example: Set rootdse = GetObject("LDAP://RootDSE") Get schemacont = GetObject("LDAP://" & rootdse.get("schemanamingcontext") ) Binding to the Configuration Container You can bind the Active Directory Configuration Container using the entry found in the RootDSE. Data in the configuration partition is replicated across forest. Example: Set rootdse = GetObject("LDAP://RootDSE") Get schemacont = GetObject("LDAP://" & rootdse.get("configurationnamingcontext") ) Who am I? NOTE: You must have a computer that runs Windows 2000 in order to execute this sample. Win32 has always provided APIs to return the name of the current user and computer. In Windows 2000, the user and computer are represented by objects stored in Active Directory. Two new Win32 APIs are provided that return the distinguished name for the logged-on user and computer: GetUserNameEx and GetComputerObjectName (another new API, GetComputerNameEx, returns the DNS name of the computer). Long GetUserNameEx(long Nameform, LPTSTR buf, ULONG * buflen);

Long GetComputerObjectName(long Nameform, LPTSTR buf, ULONG * buflen); Write a program that discovers the DN of the current domain, user, and computer. The version of ADSI that is shipped with Windows 2000 also provides a new interface, IADsADSystemInfo, that allows you to do this same task. Binding with GUID Binding to an object GUID has many advantages. An object's GUID is unique and never changes, even when the object is renamed or moved. Example: or Set obj = GetObject("LDAP://<GUID=08d0d12b43edd21196fc0080c7a2dc6b>") Set obj = GetObject("GC://<GUID=08d0d12b43edd21196fc0080c7a2dc6b>") 'for a forest-wide search Binding with SID Every security principal object (such as users, groups, computers) has a SID. You can bind to that object based on the SID. Example: Set obj = GetObject("LDAP://<SID=010500000000000515000000dcf4dc3b16c0ea32dbeb 0c50f5010000>") Binding to Global Catalog You can bind to the global catalog using GC: as the provider. To bind to the GC with a forest scope, you need to know a server name, or a domain DNS name in a forest. Optionally, you can manually enumerate the GC. Set gc = GetObject("GC://dc01") 'Using the server name Set gc = GetObject("GC://adomain.com") 'Using a domain name ----OR---- enumerate manually Set gcroot = GetObject("GC:") For each gc in gcroot 'There would be only one container on this root Next 'Now at this point, you can use the 'gc' variable to search in a forest scope. To bind to the GC with a tree scope, you need to know the tree's distinguished name: Set gc = GetObject("GC://DC=FirstDomain, DC=COM") To bind to GC with a domain scope, you need to know the domain's distinguished name: Set gc = GetObject("GC://DC=myDomain, DC=FirstDomain, DC=COM") Getting the Domain Mode

Active Directory can operate in two modes. Native mode where all domain controllers are Windows 2000 servers, or mixed mode, where the backup domain controllers can be a mix of Windows NT 4.0 servers and Windows 2000 servers. The administrator must explicitly upgrade the domain mode. To find out the current domain mode, use the following code snippet: Set rootdse = GetObject("LDAP://RootDSE") Set domain = GetObject("LDAP://" & rootdse.get("defaultnamingcontext")) mode = domain.get("ntmixeddomain") If (mode = 1) Then Debug.Print "Mixed Mode" Else Debug.Print "Native Mode" End If Listing Attributes that are Replicated to GC Only selected attributes are replicated to a GC. To find out which ones are replicated, search from the Schema container, then use either ADO or IDirectorySearch (for C++) with the following LDAP filter: (&(objectcategory=attributeschema)(ismemberofpartialattributeset=true)) Listing Indexed Attributes An indexed attribute is useful for quick searches. To find out all indexed attributes, you can bind to the Schema container using either ADO or IDirectorySearch (for C++) with the following LDAP filter. (&(objectcategory=attributeschema)(searchflags:1.2.840.113556.1.4.803:=1)) The indexed attribute is the attribute with the 0x00000001 bit set. Getting UPN Suffixes You can optionally choose UPN suffixes for your company. This list will appear on the Administrator Tool when composing a User Principal Name during user creation. Set rootdse = GetObject("LDAP://RootDSE") Set partcont = GetObject("LDAP://CN=Partitions," & rootdse.get("configurationnamingcontext")) suffixes = partcont.getex("upnsuffixes") For Each upnsuffix In suffixes Debug.Print upnsuffix Next Displaying the Canonical Name It's recommended that you display a canonical name to the user instead of a distinguished name. A canonical name (or friendly name) is in the form of

dnsdomainname/objectpath. For example, if the DN is CN=JSmith, OU=Marketing, OU=DSys, DC=ArcadiaBay, DC=Com, then its canonical name is arcadiaybay.com/dsys/marketing/jsmith. Active Directory supports an operational attribute that returns a canonized name. The attribute name is 'canonicalname'. To obtain an operational attribute, you can either use IDirectoryObject/IDirectorySearch (for VC++), or IADs::GetInfo (for VB and VC++). Example: Set o = GetObject("LDAP://CN=James Smith,OU=Marketing,OU=DSys,DC=ArcadiaBay,DC=com") o.getinfoex Array("canonicalName"), 0 Debug.Print o.get("canonicalname") 'It should print as arcadiabay.com/dsys/marketing/james Smith For Windows 2000, another option is to use IADsNameTranslate. Creating an Organizational Unit To create an organizational unit, you need to know the parent container's distinguished name. Set parentcont = GetObject("LDAP://OU=DSys,DC=ArcadiaBay,DC=com") Set ou = parentcont.create("organizationalunit", "OU=Marketing") ou.description = "Distributed System Marketing" ou.setinfo To create an organizational unit in a current domain, you can use the following code: Set rootdse = GetObject("LDAP://RootDSE") Set dom = GetObject("LDAP://" & dom.get("defaultnamingcontext")) Set ou = dom.create("organizationalunit", "OU=Marketing") ou.description = "Distributed System Marketing" ou.setinfo Creating a User A user normally lives in an organizational unit. To create a user, you'll need to supply the organizational unit and down-level user name, at the minimum. Set ou = GetObject("LDAP://OU=Marketing,OU=DSys,DC=adsidev,DC=nttest,DC=micros oft,dc=com") Set usr = ou.create("user", "CN=James Smith") '---- Mandatory attributes---- usr.put "samaccountname", "jsmith" '---- Optional attributes, you may skip this---- usr.put "sn", "Smith" usr.put "givenname", "James" usr.put "userprincipalname", "jsmith@arcadiaybay.com" usr.put "telephonenumber", "(555) 555 0111" usr.put "title", "Marketing Administrator Dept" usr.setinfo

'--Now that the user is created, reset the user's password and '--enable its account. usr.setpassword "secret***!" usr.accountdisabled = False usr.setinfo Creating a Group You can create a group or distribution list in Active Directory. Group can be either a domain local, global, or universal group. For more information about group, please follow the Active Directory Programmer's Guide. Set ou = GetObject("LDAP://OU=DSys,DC=ArcadiaBay,DC=com") Set grp = ou.create("group", "CN=Distributed System Admin") '----Creating a domain local group---- grp.put "grouptype", ADS_GROUP_TYPE_LOCAL_GROUP Or ADS_GROUP_TYPE_SECURITY_ENABLED grp.put "samaccountname", "DSysAdmin" grp.setinfo '----Adding a user to a group---- grp.add ("LDAP://CN=James Smith,OU=Marketing,OU=DSys,DC=ArcadiaBay,DC=com") Delegating an Organizational Unit Now that you have set up an organizational unit and created a user, you can delegate this organizational unit to the user. In our scenario, we will delegate the Marketing organizational unit to James Smith, so that he can create and delete users. We will need to retrieve the security descriptor of that organizational unit and set the appropriate permission for James Smith. Set ou = GetObject("LDAP://OU=Marketing, OU=DSys,DC=ArcadiaBay,DC=com") Set sec = ou.get("ntsecuritydescriptor") Set acl = sec.discretionaryacl Set ace = CreateObject("AccessControlEntry") 'Or you can use Set ace = new ADsAccessControlEntry ace.acetype = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT 'Allow to ace.accessmask = ADS_RIGHT_DS_CREATE_CHILD Or ADS_RIGHT_DS_DELETE_CHILD 'Create and delete user ace.objecttype = "{BF967ABA-0DE6-11D0-A285-00AA003049E2}" 'User's GUID (schemaidguid) ace.aceflags = ADS_ACEFLAG_INHERIT_ACE 'Prop down the ace

ace.flags = ADS_FLAG_OBJECT_TYPE_PRESENT 'Tells what objecttype is filled ace.trustee = "ARCADIABAY\Jsmith" 'Who is the beneficiary of this ace acl.addace ace sec.discretionaryacl = acl ou.put "ntsecuritydescriptor", Array(sec) ou.setinfo 'Commit to Active Directory Set ace = Nothing Set acl = Nothing Set sec = Nothing Removing a Subtree Use IADsDeleteOps to delete a subtree of Active Directory objects. Set ou = GetObject("LDAP://OU=Marketing,DC=ArcadiaBay,DC=com") ou.deleteobject (0) Ambiguous Name Resolution (ANR) Searching The LDAP filter for ANR searching is (anr=yoursearch). For example (anr=john). Listing All Attributes Used in ANR Searches Bind to the Schema container and ADO or IDirectoryobject to perform a search. All attributes that have the 0x00000004 bit set on the attributeschema object are included in the ANR query evaluations. (&(objectcategory=attributeschema)(searchflags:1.2.840.113556.1.4.803:=4)) Creating a Computer Account '----CONSTANTS---- Const UF_WORKSTATION_TRUST_ACCOUNT = &H1000 Const UF_ACCOUNTDISABLE = &H2 Const UF_PASSWD_NOTREQD = &H20 Const ADS_GUID_COMPUTRS_CONTAINER = "aa312825768811d1aded00c04fd8d5cd" Const ADS_ACETYPE_ACCESS_ALLOWED = 0 Const ADS_ACEFLAG_INHERIT_ACE = 2 '----PARAMETERS ---- lflag = UF_WORKSTATION_TRUST_ACCOUNT Or UF_ACCOUNTDISABLE Or UF_PASSWD_NOTREQD scomputer = "mymachine" suserorgroup = "MYDOMAIN\MyGroup" 'Who can join this computer. '----BUILD WELL-KNOWN GUID ADSPATH FOR COMPUTER CONTAINER----

Set rootdse = GetObject("LDAP://RootDSE") spath = "LDAP://<WKGUID=" & ADS_GUID_COMPUTRS_CONTAINER spath = spath + "," spath = spath + rootdse.get("defaultnamingcontext") spath = spath + ">" Set compcont = GetObject(sPath) 'Bind again to get the correct ADsPath spath = "LDAP://" & compcont.get("distinguishedname") Set compcont = GetObject(sPath) '----CREATE A COMPUTER OBJECT---- Set comp = compcont.create("computer", "CN=" & scomputer) comp.put "samaccountname", scomputer + "$" comp.put "useraccountcontrol", lflag comp.setinfo '----SET INITIAL PASSWORD---- spwd = scomputer & "$" spwd = StrConv(sPwd, vblowercase) comp.setpassword spwd '----SET SECURITY---- Set sd = comp.get("ntsecuritydescriptor") Set dacl = sd.discretionaryacl '----SET ACE---- Set ace = CreateObject("AccessControlEntry") ace.accessmask = -1 'Full Permission (Allowed) ace.acetype = ADS_ACETYPE_ACCESS_ALLOWED ace.trustee = suserorgroup '----ACL---- dacl.addace ace sd.discretionaryacl = dacl '----SD---- comp.put "ntsecuritydescriptor", Array(sd) comp.setinfo '----ENABLE THE ACCOUNT---- comp.accountdisabled = False comp.setinfo

1. Hvad er Active Directory Active Directory er den næste generation af Windows NT SAM database. Active Directory indeholder informationer om personer, grupper, computere samt ressourcer såsom filer, printere & applikationer (objekter). Alle objekter har en række attributter, som f.eks. brugers fornavn, efternavn, e-mailadresse m.m. Træer (forest): Globalt Katalog: Det globale katalog indeholder oplysninger om alle objekter i alle domainer. Kataloget bliver automatisk replikeret til alle de DC'er der er defineret som globale katalog servere. Sites: Det er muligt at definere sites, som bestemmes af et eller flere subnets. Active Directory Modes: Mixed mode: NT 4.0 & Windows2000 Domain Kontrollere kan blandes i samme domain. Native mode: Heri kan kun indgå Windows2000 Domain kontrollere. Active directory installeres altid i mixed-mode. For at skifte til native mode anvendes værktøjet 'Domain Tree Management'. Man kan dog ikke skifte tilbage fra native mode til mixed mode, det kræver en NT re-installation. Extensible Storage Engine (ESE) er database-motoren som håndterer active directory. ESE kan håndtere op til 17TB, hvilket betyder at active directory teoretisk kan indeholde 10 millioner objekter pr. domain. Grupper Security Group kan optræde i ACL'er, dvs, at personer som optræder i security groups kan få tildelt rettigheder via grupperne. Dette kan sammenlignes

med Local Groups i Windows NT 4.0. Universal Groups kan indeholde brugere på tværs af domainer og kan ligeledes tildeles ressourcer på tværs, såfremt alle domainer findes i samme forest (skov) eller i samme tree (træ). I native mode kan Universal Groups indeholde brugere, Universal Groups og Global groups fra ethvert domain. Global Groups kan indeholde brugere fra domainet, hvor gruppen eksistere og kan tildeles rettigheder på tværs af domainer såfremt at alle domainer er i samme forest eller træ. I native mode kna Global Groups indeholde brugere og andre Global Groups fra samme domain. I mixed mode kan Global Groups kun indeholde brugere (som i Windows NT 4.0). Domain Local Groups kan indeholde brugere fra domainet hvor gruppen eksistere og kan tildeles rettigheder på Domain Controller og på Member Servere. I native mode kan Domain Local Groups indeholde brugere, Universal Groups, Global Groups (det er således muligt at nesting groups) - på tværs af domainet. I mixed mode kan Domain Local Groups indeholde Global Groups og brugere (som kendt fra Windows NT 4.0). Universal- og Global grupper optræder i det globale katalog. Gruppemedlemer i globale grupper gemmes ikke det globale katalog. 2. Windows 2000 Installation: Windows 2000 installeres som stand-alone server. Derefter kan man opgradere den til DC vha. DCPROMO.EXE programmet. Hvis man vælger at indgå i et eksisterende domain spørges efter domainnavnet, administrator account og password. Hvis man vælger at oprette et nyt domain spørges om at oprette et nyt domain-træ (new forest of domain trees) eller indgå i et allerede eksisterende træ (new domain in an existing forest) som et nyt child domain. DC'en installeres automatisk i mixed mode, hvilket kan ændres til native mode i 'Active Directory Tree Manager'. DC'en installeres ligeledes som en standart global katalog server hvilket kan slås fra i 'Active Directory Sites and Services'. Husk der altid skal være en global katalog server i nærheden af brugerne, men ikke nødvendigvis flere. Denne funktion kan slås fra i NTDS settings. User Document Management: Spejling af data til netværket og mellemlagring af udvalgte data lokalt. User Settings Management: Spejling af brugeropsætning til netværket (roaming). Fil Systemet: NTFS V5 i forhold til version 4: - Kryptering af filer og biblioteker - Udvidelse af partitioner uden genstart - Distributed link tracking (flyttes en fil rettes shortcuts automatisk) - Mount Points (drev kan tildeles som under bibliotek og spare dermed drev bogstaver) - Fuld tekst- og property indesering Storage type: BASIC: Indeholder primary partition, extended og logiske drev. DYNAMISK: Indeholder simple volumes, spanned volumes, mirror volumes m.fl. Diske kan opgraderes fra Basic til Dynamisk. Admission Control Service: Kan reservere prioriteret båndbredde til de klienter som understøtter 'Subnet Bandwidth Management' (SBM), herunder Windows98 og Windows2000. Prioriteret båndbredde betyder at den båndbredde, som klienterne reserverer får større prioritet end anden netværks kommunikation. Applikationerne som

skal anvende den skal understøtte Quality-of-Service (QoS). Applikationerne kunne f.eks være video eller lyd. Computer Management 9. Disk Administration Dynamic Storage: opgradering hertil kan kun gøres på fysiske drev - derefter er der ingen downgrade muligheder. Dynamic Volumes: Kan kun oprettes på dynamic storage, herefter laver man en 'create volume'. Derefter kan man vælge mellem flere typer af dynamic storage: - Simple volume - Spanned volume - Stribed volume - Mirrored volume - Raid5 volume I windows2000 er der også muligt at tilknytte en partition til et tomt bibliotek. Klienten dirigeres videre til den fysiske partition. Det er også muligt at tilføje diske, som er oprettet på en anden computer. Der vælges 'Import foreign Disk', hvis det er en enkelt disk. Hvis der derimod er tilføjet flere diske, vælges der 'Add Disk'. QUOTA Det er i Windows2000 muligt at sætte quota for brugerne, men kun (p.t.) for hele drevet. Herefter kommer der en event log, hvis bruger overstiger den definerede værdi.

Remote Storage Management: Kan windows2000 placere ældre filer, som ikke anvendes på bånd. Hvis brugeren forespørger på de filer, som er flyttet til bånd, henter Windows2000 filerne. Egenskaber for diskplads og filer: - Desired free space (i %) - Minimum file size (default 12kb) - File not accessed in (default 180 days) - Media type (hvilken en af de installerede båndstationer skal benyttes) - Schedule (hvornår skal der checkes for filer som skal flyttes) 10. Distributed File System (DFS) Et Dfs volume er et bibliotek, der deles ud til klienterne, som almindelig share. Et Dfs volume kan indeholde Dfs-noder, som hver især peger på andre shares på samme eller andre servere. Brugerne forbinder sig til Dfs volume og ser noderne som underbiblioteker i dette share. Fordele: - Brugerne skal kun forbinde sig til et share - Nemt at flytte bibliotek til anden server ved blot at ændre Dfs-noden. - Performance 12. Directory Management Opret OU-strukturen (hierarkisk) så den afspejler firma strukturen, som herunder f.eks.

Det kan være uhensigtsmæssig at brugerne kan se de mapper som ikke er relaterede til organisationen, som f.eks. mappen Computers. Denne mappe kan skjules ved at slå 'Anvanced Features' til i console menuen (view). Vælg properties på den ønskede mappe som skal gøres usynlig. Derefter security og find 'Authenticated Users', fjern read rettigheden for denne bruger. Grupper: Rettighed kan kun i beta3 tildeles til grupper på shares permissions. Shares: skal først oprettes i Explorer. Efter oprettelsen og tildeling af rettigheder på gruppe niveau, kan/skal shares 'offenliggøres' i Active directory mapperne. Lokal Logon: Højre klik på Domain-Controllers mappen, vælg properties, vælg Group Policy, vælg Default Domain Controllers Policy / edit. Find 'User Rights Assignment' under Computer Configuration/Windows Settings/Local Policy, og tilføj de brugere eller grupper som skal have logon locally rettigheder. For at ændringen træder ikraft, kør følgende kommando fra en DOS box: C:\>secedit /refreshpolicy MACHINE_POLICY ellers kan der gå op til 8 timer før end at ændringen er aktiv.

13. Policy Editor Policies kan oprettes lokalt på computeren og på orgazitation units. Med policies kan man gøre følgende: - Distribuere software (MSI) - Distribuere iconer og dokumenter - Tilrette opsætning - Tilrette sikkerhed - Sætte scrips op til afvikling ved start/afslutning af windows Policies er opdelt i to dele, en for computeren og en for brugeren. Egenskaber i OU policies for computer er altså uafhængig af hvem der benytter computeren. Egenskaber i OU policies nedarves, hvis man har oprettet er hierarkisk OU-struktur. Hvis egenskaber er ens på flere OU policies, er det egenskabet tættest på brugeren som er gældende..... 14. Directory Migration Directory service migration tool kan migrere både bindery-objekter og NDS-objekter (Netware 4.x). Dette tool anvender en offline database, hvilket giver mulighed for tilretning inden eksport til active directory.

15. Active Directory Connector Er et program til directory-forbindelse mellem Windows2000 og Microsoft Exchange Server. Programmet kan installeres fra \VALUEADD\MGMT\ADC 16. Remote Installation Service (RIS) Klienterne/netkort skal overholde NetPC specifikationerne, eller have et netkort som understøtter Pre-boot Execution Enviroment (PXE). NetPC & PXE indeholder en DHCP klient og en TFTP klient. På \VALUEADD\MGMT\BOOTDISK er der et program som emulere PXE. RIS kræver DHCP & DNS Server installeret i netværket. Efter installering af RIS, klargøres et image som indeholder operativsystemet. Start RISETUP fra cmd for at klargøre images. Denne procedure kopiere de nødvendige filer til område på disk (NTFS), må dog ikke være det samme som Windows2000 systemfilerne ligger på. Der kan adderes til images vha. RISETUP efterfølgende, der skal dog findes en SIF template fil. Den bruger som logger på skal have 'Log on as batch job' rettighed. Administrationen foregår vha dsa'en, på properties under domain controllers/servernavn. Hvis egenskaberne ændres skal RIS genstartes, dette kan gøres ved at udføre følgende: - net stop binlsvc - net start binlsvc 18. Active Directory Sites and Services Manager Anvendes til administration af sites og de servere, som findes heri. Man kan også oprette nye sites, site subnet, servere og forbindelser mellem sites.