This example shows you how to create a plug-in for the ResourceEditor and integrate with the Netscape Admin Server 4.0 Users and Groups editor. The example is a plug-in to edit user entries. You can follow these steps to create plug-ins to edit group and organizational unit entries as well.
The Directory Server should have an object class named SuperMailUser.
When the example
calls a SuperMailUser object, the user and group editor displays the
proper UI plug-in.
Step 1. Define a new object class called SuperMailUser and update the Directory Server
This has been done in the SuperMailSchema.conf file. In order to update the directory server with this schema, copy the file to this directory: <server-root>/slapd-<servername>/configStep 2. Modify the default object classes for users to include the SuperMailUser object classSuppose you have installed the Netscape Directory Server in /usr/netscape/server4 and named the server as corporate. Copy the SuperMailSchema.conf file to this directory: /usr/netscape/server4/slapd-corporate/config.
In addition, you must edit the /usr/netscape/server4/slapd-corporate/config/ns-schema.conf file to include the SuperMailSchema.conf file.
After doing this, restart the Directory Server to pick up the new schema information.
The AddSuperMailUser.ldif file contains the necessary changes to modify the entry at:Step 3. Add the resource editor extension class for the SuperMailUser object class
dn: cn=user, cn=defaultObjectClassesContainer, ou=4.0, ou=Admin, ou=Global Preferences, ou=mcom.com, o=NetscapeRoot.This entry is used by the ResourceEditor to determine which object classes need to be edited for a user. Note that ou=mcom.com should be changed to the domain name was used during the installation of the Console and Directory Server.
To modify the default object classes for users, first modify the AddSuperMailUser.ldif file as necessary, then do an ldapmodify -f AddSuperMailUser.ldif.
The SuperMailUser.ldif file contains the necessary changes to add the entry at:Step 4. Copy the jar files to <server-root>/java/jars directorydn: cn=superMailUser, cn=ResourceEditorExtension, ou=4.0, ou=Admin, ou=Global Preferences, ou=mcom.com, o=NetscapeRoot.
This entry is used by the ResourceEditor to instantiate the plug-ins for editing a user entry. Note that ou=mcom.com should be changed to the domain name was used during the installation of the Console and Directory Server.
To add the resource editor extension, first modify the SuperMailUser.ldif file as necessary, then perform an ldapmodify -a -f SuperMailUser.ldif.
To get this example working, copy the SuperMailUGPlugin.jar and SuperMailUGPlugin_en.jar files to the <server-root>/java/jars directory.Step 5. Start the consoleUsing the above example of an installation at /usr/netscape/server4, the target directory is /usr/netscape/server4/java/jars.
Run /usr/netscape/server4/startconsole.To see the installed plug-in, log in. Go to the User and Groups Tab and create a new user.