Tuesday, November 8, 2011
Wednesday, November 2, 2011
Enabling the schema manager in Active Directory
Another way to modify the schema is to edit the registry.
- Start regedit.
- Go to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters registry entry.
- Double-click Schema Update Allowed (of type REG_DWORD).
- Set the value to 1.
- Click OK.
- Close the registry editor.
Tuesday, September 13, 2011
Ant build script to automate OIM build
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="Builder" default="BuildAll">
<property name="debug" value="on"/>
<property name="project.home" value=".."/>
<property name="src.dir" value="${project.home}/source"/>
<property name="WebApp.src.dir" value="${project.home}/xlWebApp"/>
<property name="test.src.dir" value="${project.home}/testsource"/>
<property name="XellerateFull.src.dir" value="${project.home}/XellerateFull"/>
<property name="lib.dir" value="${project.home}/lib"/>
<property name="build.dir" value="${project.home}/build"/>
<property name="javadocs.dir" value="${build.dir}/javadocs"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="build.classes.dir.com" value="${build.dir}/classes/com"/>
<property name="build.deploy.dir" value="${build.dir}/deploy"/>
<property name="build.deploy.JavaTasks.dir" value="${build.deploy.dir}/JavaTasks"/>
<property name="build.deploy.ScheduleTask.dir" value="${build.deploy.dir}/ScheduleTask"/>
<property name="build.deploy.ThirdParty.dir" value="${build.deploy.dir}/ThirdParty"/>
<property name="build.deploy.EventHandler.dir" value="${build.deploy.dir}/EventHandlers"/>
<path id="project.class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target description="Clean All" name="Clean">
<delete dir="${build.classes.dir.com}" />
<delete dir="${build.deploy.dir}"/>
<delete dir="${javadocs.dir}"/>
</target>
<target description="Build Java Documentation." name="javadoc">
<delete dir="${javadocs.dir}"/>
<mkdir dir="${javadocs.dir}"/>
<javadoc use="true" doctitle=" Documentation" windowtitle=" JavaDoc" private="true" sourcepath="${src.dir}" packagenames="com.*" destdir="${javadocs.dir}">
<classpath refid="project.class.path"/>
</javadoc>
</target>
<target name="Initialize" description="Initialize Build Directories" >
<tstamp/>
<mkdir dir="${build.deploy.dir}"/>
<mkdir dir="${build.deploy.JavaTasks.dir}"/>
<mkdir dir="${build.deploy.ScheduleTask.dir}"/>
<mkdir dir="${build.deploy.ThirdParty.dir}"/>
<mkdir dir="${build.deploy.EventHandler.dir}"/>
</target>
<target description="ScheduledTask" name="ScheduledTask" depends="Initialize">
<javac debug="${debug}" deprecation="false" destdir="${build.classes.dir}" srcdir="${src.dir}">
<classpath refid="project.class.path"/>
<include name="**/com/xxx/scheduledtasks/**/*.java"/>
</javac>
<jar basedir="${build.classes.dir}" jarfile="${build.deploy.ScheduleTask.dir}/ScheduledTasks.jar" >
<include name="**/com/xxx/scheduledtasks/**/*.class"/>
</jar>
</target>
<target description="JavaTasks" name="JavaTasks" depends="Initialize">
<javac debug="${debug}" deprecation="false" destdir="${build.classes.dir}" srcdir="${src.dir}">
<classpath refid="project.class.path"/>
<include name="**/com/xxx/javatasks/**/*.java"/>
</javac>
<jar basedir="${build.classes.dir}" jarfile="${build.deploy.JavaTasks.dir}/JavaTasks.jar" >
<include name="**/com/xxx/javatasks/**/*.class"/>
</jar>
</target>
<target description="EventHandlers" name="EventHandlers" depends="Initialize">
<javac debug="${debug}" deprecation="false" destdir="${build.classes.dir}" srcdir="${src.dir}">
<classpath refid="project.class.path"/>
<include name="**/com/xxx/eventhandlers/**/*.java"/>
</javac>
<jar basedir="${build.classes.dir}" jarfile="${build.deploy.EventHandler.dir}/EventHandlers.jar" >
<include name="**/com/xxx/eventhandlers/**/*.class"/>
</jar>
</target>
<target description="ThirdParty" name="ThirdParty" depends="Initialize">
<javac debug="${debug}" deprecation="false" destdir="${build.classes.dir}" srcdir="${src.dir}">
<classpath refid="project.class.path"/>
<include name="**/com/xxx/utils/**/*.java"/>
</javac>
<jar basedir="${build.classes.dir}" jarfile="${build.deploy.ThirdParty.dir}/Util.jar" >
<include name="**/com/xxx/utils/**/*.class"/>
</jar>
</target>
<target description="BuildAll" name="BuildAll" depends="Clean, Initialize, ScheduledTask, JavaTasks, EventHandlers, ThirdParty">
</target>
</project>
<project basedir="." name="Builder" default="BuildAll">
<property name="debug" value="on"/>
<property name="project.home" value=".."/>
<property name="src.dir" value="${project.home}/source"/>
<property name="WebApp.src.dir" value="${project.home}/xlWebApp"/>
<property name="test.src.dir" value="${project.home}/testsource"/>
<property name="XellerateFull.src.dir" value="${project.home}/XellerateFull"/>
<property name="lib.dir" value="${project.home}/lib"/>
<property name="build.dir" value="${project.home}/build"/>
<property name="javadocs.dir" value="${build.dir}/javadocs"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="build.classes.dir.com" value="${build.dir}/classes/com"/>
<property name="build.deploy.dir" value="${build.dir}/deploy"/>
<property name="build.deploy.JavaTasks.dir" value="${build.deploy.dir}/JavaTasks"/>
<property name="build.deploy.ScheduleTask.dir" value="${build.deploy.dir}/ScheduleTask"/>
<property name="build.deploy.ThirdParty.dir" value="${build.deploy.dir}/ThirdParty"/>
<property name="build.deploy.EventHandler.dir" value="${build.deploy.dir}/EventHandlers"/>
<path id="project.class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target description="Clean All" name="Clean">
<delete dir="${build.classes.dir.com}" />
<delete dir="${build.deploy.dir}"/>
<delete dir="${javadocs.dir}"/>
</target>
<target description="Build Java Documentation." name="javadoc">
<delete dir="${javadocs.dir}"/>
<mkdir dir="${javadocs.dir}"/>
<javadoc use="true" doctitle=" Documentation" windowtitle=" JavaDoc" private="true" sourcepath="${src.dir}" packagenames="com.*" destdir="${javadocs.dir}">
<classpath refid="project.class.path"/>
</javadoc>
</target>
<target name="Initialize" description="Initialize Build Directories" >
<tstamp/>
<mkdir dir="${build.deploy.dir}"/>
<mkdir dir="${build.deploy.JavaTasks.dir}"/>
<mkdir dir="${build.deploy.ScheduleTask.dir}"/>
<mkdir dir="${build.deploy.ThirdParty.dir}"/>
<mkdir dir="${build.deploy.EventHandler.dir}"/>
</target>
<target description="ScheduledTask" name="ScheduledTask" depends="Initialize">
<javac debug="${debug}" deprecation="false" destdir="${build.classes.dir}" srcdir="${src.dir}">
<classpath refid="project.class.path"/>
<include name="**/com/xxx/scheduledtasks/**/*.java"/>
</javac>
<jar basedir="${build.classes.dir}" jarfile="${build.deploy.ScheduleTask.dir}/ScheduledTasks.jar" >
<include name="**/com/xxx/scheduledtasks/**/*.class"/>
</jar>
</target>
<target description="JavaTasks" name="JavaTasks" depends="Initialize">
<javac debug="${debug}" deprecation="false" destdir="${build.classes.dir}" srcdir="${src.dir}">
<classpath refid="project.class.path"/>
<include name="**/com/xxx/javatasks/**/*.java"/>
</javac>
<jar basedir="${build.classes.dir}" jarfile="${build.deploy.JavaTasks.dir}/JavaTasks.jar" >
<include name="**/com/xxx/javatasks/**/*.class"/>
</jar>
</target>
<target description="EventHandlers" name="EventHandlers" depends="Initialize">
<javac debug="${debug}" deprecation="false" destdir="${build.classes.dir}" srcdir="${src.dir}">
<classpath refid="project.class.path"/>
<include name="**/com/xxx/eventhandlers/**/*.java"/>
</javac>
<jar basedir="${build.classes.dir}" jarfile="${build.deploy.EventHandler.dir}/EventHandlers.jar" >
<include name="**/com/xxx/eventhandlers/**/*.class"/>
</jar>
</target>
<target description="ThirdParty" name="ThirdParty" depends="Initialize">
<javac debug="${debug}" deprecation="false" destdir="${build.classes.dir}" srcdir="${src.dir}">
<classpath refid="project.class.path"/>
<include name="**/com/xxx/utils/**/*.java"/>
</javac>
<jar basedir="${build.classes.dir}" jarfile="${build.deploy.ThirdParty.dir}/Util.jar" >
<include name="**/com/xxx/utils/**/*.class"/>
</jar>
</target>
<target description="BuildAll" name="BuildAll" depends="Clean, Initialize, ScheduledTask, JavaTasks, EventHandlers, ThirdParty">
</target>
</project>
Friday, September 2, 2011
Modifying the maxpagesize in active directory
By default, windows returns only a maximum of 1000 objects in response to a single LDAP query. This can be a limitation when you have more than 1000 objects in your Active Directory and you are running some kind of script that does a bulk import of objects (user accounts and/or computers) from Active Directory.
Some applications like Adobe Connect also require such bulk imports. If you find that the number of user accounts imported from Active Directory is exactly 1000 when you are sure there are more, its time to take a look at this.
The 1000-object limit is governed by the MaxPageSize LDAP administration limit, which is defined using NTDSUTIL. To increase the value:
1.Open Command Prompt on a domain controller, logged in as domain administrator.
2.Type NTDSUTIL and press ENTER.
3.In the ntdsutil: prompt, type ldap policies
4.In the ldap policy: prompt, type connections
5.In the server connections: prompt, type connect to server <FQDN of domain controller>
6.Once you are connected, type q to come back to the ldap policy: prompt.
7.If you type show values, you can see the current value for the administration limits, including the MaxPageSize limit.
8.To change the value to allow up to 30,000 objects to be returned in a single LDAP query, type set MaxPageSize to 30000
9.You can view your changes by typing Show Changes. Note that the new values appear in brackets, because you have not yet commited your changes.
10.To commit changes type commit changes
Some applications like Adobe Connect also require such bulk imports. If you find that the number of user accounts imported from Active Directory is exactly 1000 when you are sure there are more, its time to take a look at this.
The 1000-object limit is governed by the MaxPageSize LDAP administration limit, which is defined using NTDSUTIL. To increase the value:
1.Open Command Prompt on a domain controller, logged in as domain administrator.
2.Type NTDSUTIL and press ENTER.
3.In the ntdsutil: prompt, type ldap policies
4.In the ldap policy: prompt, type connections
5.In the server connections: prompt, type connect to server <FQDN of domain controller>
6.Once you are connected, type q to come back to the ldap policy: prompt.
7.If you type show values, you can see the current value for the administration limits, including the MaxPageSize limit.
8.To change the value to allow up to 30,000 objects to be returned in a single LDAP query, type set MaxPageSize to 30000
9.You can view your changes by typing Show Changes. Note that the new values appear in brackets, because you have not yet commited your changes.
10.To commit changes type commit changes
Ntdsutil Usage
Ntdsutil.exe is a command-line tool that provides management facilities for Active Directory Domain Services (AD DS) and Active Directory Lightweight Directory Services (AD LDS). You can use the ntdsutil commands to perform database maintenance of AD DS, manage and control single master operations, and remove metadata left behind by domain controllers that were removed from the network without being properly uninstalled. This tool is intended for use by experienced administrators.
Ntdsutil.exe is built into Windows Server 2008 and Windows Server 2008 R2. It is available if you have the AD DS or the AD LDS server role installed. It is also available if you install the Active Directory Domain Services Tools that are part of the Remote Server Administration Tools (RSAT). For more information, see How to Administer Microsoft Windows Client and Server Computers Locally and Remotely (http://go.microsoft.com/fwlink/?LinkID=177813).
To use Ntdsutil.exe, you must run the ntdsutil command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.
Ntdsutil.exe is built into Windows Server 2008 and Windows Server 2008 R2. It is available if you have the AD DS or the AD LDS server role installed. It is also available if you install the Active Directory Domain Services Tools that are part of the Remote Server Administration Tools (RSAT). For more information, see How to Administer Microsoft Windows Client and Server Computers Locally and Remotely (http://go.microsoft.com/fwlink/?LinkID=177813).
To use Ntdsutil.exe, you must run the ntdsutil command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.
Subscribe to:
Posts (Atom)