Yolinux.com Linux logo

aWebDap V1.10 - Web front-end to LDAP

AWebDap web CGI software downloads and configuration tutorial page.

aWebDap is a web front-end to an LDAP address directory server. It provides a friendly way to query, view, update, add and delete data on the LDAP server. AWebDap supports HTML web browsers but also offers unique support for web enabled cell phones using WTAI for dialing and address book interface features. It supports LDAP URL's which will interface with the address book in MS/Outlook. The native LDAP server capabilities are unchanged and will interface with address clients in their usual fashion. It also supports vCARD which works very well for some cell phones, personal organizer applications and the Netscape 4.X address book. Unlike other web front-ends, use of the aWebDap front-end was intended for the non-techie and presents an interface which is intuitive. (i.e. you don't have to understand LDAP jargon like dn statements) Even your mother will like it!

aWebDap is a CGI executable which provides a friendly web front-end to an LDAP database for users and administrators. The aWebDap system is comprised of three files, (1) an executable which can be placed in your "/cgi-bin/" directory, (2) an HTML form to interface with the CGI, and (3) the configuration file /etc/awebdap.conf. The power and flexibility of aWebDap comes from the configuration file which presents many options to the user from a fully featured web presentation for web browsers and a low weight presentation for PDA and cell phone web access. Awebdap also supports https secure connections.

Also See:

Contents:


Download and Installation:

Installation of aWebDap V1.10:

  1. Download free unsupported "basic" version: (Version 1.10: Sept 12 2008)
    Note: 32 bit (i386) binaries will run on 32 bit and 64 bit Linux. A 64 bit (x86_64) binary wil only run on 64 bit Linux.

    There are no time, functionality or distribution limitations put on the free unsupported "basic" version. The free unsupported "basic" version adds the message that it is the free basic version and does not have the option to place a logo at the top of the page. The purchased "premium" version also allows the user to specify the web page background color.

  2. Unpack: tar xzf awebdap-basic-version-1.10-gccXXX.tar.gz
    This will unload four files:
    1. aWebDap license
      Read the license.
    2. cgi-bin/awebdap.cgi-basic-1.10-gccXXX
      Move this file to your cgi directory and rename awebdap.cgi:
      • Red Hat Enterprise Linux, CentOS and Fedora 3: /var/www/cgi-bin/awebdap.cgi
      • Ubuntu: /usr/lib/cgi-bin/awebdap.cgi
      The file should have world read and execute access. (chmod ugo+rx awebdap.cgi)
    3. etc/awebdap.conf
      Move this file to the etc directory: /etc/awebdap.conf
    4. html/stooges.html
      Move this file to a web accessible directory.
      • Red Hat Enterprise Linux, CentOS and Fedora: /var/www/html/stooges.html
      • Ubuntu default: /var/www/stooges.html or /var/www/html/stooges.html

  3. SELinux security configuration (i.e. Red Hat EL, Fedora, CentOS): Not required for systems which have SELinux disabled or for non-SELinux systems such as Ubuntu.

  4. Configure an LDAP server or use our LDAP server example.
    To set-up an example LDAP server see: YoLinux LDAP quick start example. (Example LDAP database with entries for "The Three Stooges": Larry, Curley and Moe.)
    A working LDAP server is required for this web front-end.

  5. Point your browser to http://localhost/stooges.html
    Note that the web server must be running. To start:

The example shown here is configured to match the LDAP database described by the LDIF files and configuration presented in the YoLinux LDAP quick start example.


Purchase supported "premium" version: (more features: add images (i.e. corporate logo), set background colors, ...)


System requirements:

Tested with the following Linux distributions:

Verify that the appropriate modules are installed with the command:

Note: For other distributions of Linux, note that aWebDap is compiled with gcc versions:

and should be compatable with later releases of gcc.


[Potential Pitfall]: AWebDap 1.10 is compiled with LDAP V2 libraries. If using aWebDap with an LDAP V3 server, you must allow V2 client access. This is set in the file slapd.conf:

..
...
allow bind_v2
...
..
          
Restart ldap after editing file.

[Potential Pitfall]: Red Hat introduced SELinux (Security Enhanced Linux) with Enterprise Linux 4 and Fedora Core 3 which is so secure that sometimes if not configured perfectly, it will not allow aWebDap to operate. If you can't get SELinux configured correctly, you can disable SELinux by setting the SELINUX directive in the file: /etc/selinux/config

SELINUX=disabled
Reboot system after editing file. To temporarily disable SELinux on a running system, use the command: setenforce 0. This command will not permanently change the system default.
This can also fix LDAP bind errors.

[Potential Pitfall]: System misconfiguration can cause aWebDap to crawl to intolerably slow speeds. Your server must be self aware. Add a line in /etc/hosts for the servers IP address:

    127.0.0.1           node-name localhost.localdomain localhost
    XXX.XXX.XXX.XXX     node-name
          
Where XXX.XXX.XXX.XXX is the IP address of your server and node-name is the name of your server as defined by the name returned by the command hostname.

[Potential Pitfall]: When using current v3 LDAP servers (Fedora Core 3+), one must configure OpenLDAP to accept v2 protocol access. Add the statement "allow bind_v2" after the schema "include" directives in the file /etc/openldap/slapd.conf.

[Potential Pitfall]: If your web server log (/var/log/httpd/error_log) shows the following error:

[error] /var/www/cgi-bin/awebdap.cgi: error while loading shared libraries: libldap.so.2: ...
Fix by installing the rpm "compat-openldap-X.X.XX_XXXX.i386.rpm"

[Potential Pitfall]: Ubuntu / Debian - AWebDap generated hyperlink uses unknown protocol "www://" instead of "http://".

Change /etc/services from:
..
...

www             80/tcp          http            # WorldWideWeb HTTP
www             80/udp          http            # HyperText Transfer Protocol

...
..
          
To:
..
...

http            80/tcp          www             # WorldWideWeb HTTP
http            80/udp          www             # HyperText Transfer Protocol

...
..
         


aWebDap web interface and use:

Working examples are shown below, not screen shots.


Sample: Page 1 - The HTML form used to interface with awebdap.cgi


Stooges Family Directory


Phone Book and Contact Database

Press the "Submit" button to try the aWebDap online demo.


Sample: Results of query. (Input "*" to search for all entries) The following page would then be generated by aWebDap.

Results from database search:

Person (LDAP URL) E-Mail Address Home Phone Work Phone More Info Modify VCard
Fine, Larry LFine@isp.com 800-555-1313 (800)555-1212 Display Modify VCard
Howard, Moe MHoward@isp.com 800-555-1313 none Display Modify VCard
Howard, Curley CHoward@isp.com 800-555-1313 none Display Modify VCard


Number of matches:3


Note on cgi generated links: AWebDap will use the CGI environment to determine the port number used for the "Display", "Modify" and "VCard" links. By default web servers are configured for port 80 and thus no port is specified. If a port other than 80 is used by the web server, aWebDap will detect this and specify the alternate port. If aWebDap detects that the port is a usable service as defined by the file /etc/services, then the service prefix is used. If no existing service is defined in the file /etc/services, the service will be specified as "http://", the server name and then the port number (":number").
Examples:

The use of https or the use of a non-standard port will require apache httpd configuration for this support. Also the html form must also reference the proper service or port. Red Hat default installations support https.


Sample: More Info link "Display" selected. The following page would then be generated by aWebDap.

Stooges: Database Information

Curley Howard

E-Mail Address: CHoward@isp.com
Home Phone: 800-555-1313
Work Phone:
Mobile Phone: 800-555-1318
Street Address: 16 Cherry St.
Locality/City: Dallas
State/Province: TX
Postal Code: 76888


Sample: "Modify" link selected. The following page would then be generated by aWebDap.

Stooges: Modify database entry

Larry Fine

E-Mail Address:
Home Phone:
Work Phone:
Mobile Phone:
Street Address:
Locality/City:
State/Province:
Postal Code:

Password:




HTML Form Configuration:

HTML Form Source to interface with aWebDap cgi:

<html>
<head>
<title>Stooges Family Directory</title>
</head>
<body bgcolor="#ffffff" text="#000000">
<p>
<hr width=65%>
<p>
<center>
   <h1>Stooges Family Directory</h1>
</center>
<p>
<hr width=65%>
<p>
<h3>Phone Book and Contact Database</h3>
<p>
<form method="post" action="http://localhost/cgi-bin/awebdap.cgi">
 <select name="selectoption">
   <option value="personname">Name contains:
   <option value="residentofl">Lives in the city of:
   <option value="residentofpostalcode">Postal code begins with:
   <option value="residentofstate">Lives in the state of:
 </select>
 <input type="hidden" name="type" value="query">
 <input type="hidden" name="awebdapdomain" value="DOMAIN1">
 <input type="TEXT" name="searchfor" value="*">
 <input type="submit" value="Submit">
</form>
<p>
</body>
</html>
          

Note:


Configuration file: /etc/awebdap.conf

AWebDap configuration file directives: (Case sensitive)

Directive Description Default
START Give name assigned to configuration file segment. (required)
OrgName Organization name used for display purposes only. (Usually set to match the LDAP attribute "o".) AWEBDAP
OrgLogo Active only in the premium version. Image file referenced in web pages generated by aWebDap (i.e. search results, info, modify). Use full URL path from starting "/" (Apache DocumentRoot)
i.e. OrgLogo:/images/logo.gif: refers to file /var/www/html/images/logo.gif for the default Red Hat and Fedora Apache configuration.

HtmlLang Specify the "lang" in the HTML tag "<html lang="EN" dir="LTR">"
This helps AWebDap support other languages as specified by RFC1766. AWebDap specifies LTR: Left-to-right text. (V1.8b)
EN
CSS Active only in the premium version. Specify a Cascading Style Sheet (css) file. (i.e. /awebdap.css The leading "/" is required or the browser will look to the "cgi-bin" directory for the file.) If this is specified then BackgroundColor, TextColor, LinkColor and VLinkColor are all ignored. (V1.8)
Example: CSS:/stooges.css:

HtmlCharset Specify the "charset" in the meta tag "<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">"
This helps AWebDap support other languages and character sets. (V1.8b)
UTF-8
VcardCharset Specify the "charset" for VCARD output: "Content-type: text/x-vcard; charset=us-ascii; ..."
This helps AWebDap support other languages and character sets. (V1.8b)
us-ascii
BackgroundColor Active only in the premium version. Set HTML background color for the web interface. (V1.7)
Example: BackgroundColor:#ffffff:
"#d0d0d0"
TextColor Set HTML text color for the web interface. "#000000" (black)(V1.7)
Example: TextColor:#000000:
LinkColor Set HTML hyperlink text color for the web interface. (V1.3) "#0000ff" (blue)(V1.7)
VLinkColor Set HTML visited hyperlink text color for the web interface. (V1.7) "#000080" (navy)
PageType Output Page Type:
  • HtmlExtra: Indenting, table borders and table cell padding. (V1.7)
  • HtmlMinimal: Used for small displays. (i.e. phones) Eliminates "Extra" indenting, table borders and table cell padding. (V1.7)
  • WmlMinimal: Outputs WAP WML page of mime type "text/vnd.wap.wml". (V1.8)
It is best to use separate configurations for Cell phones and desktop computers. Also limit display items for PDA's.
HtmlExtra
UrlReturnLink Display URL hyperlink at bottom of page. Typically used to return to search page. Also many cell phones do not have a "back" button and require this link. Specify relative URL from "DocumentRoot" directory. The network service (i.e. http) and server name are determined from other aWebDap directives (WebServer,WebServerPort). Link text displayed will be "Return". (V1.7)
TechContact Email address of technical contact. Displayed as the webmaster in error messages. (required)
WebServer Specify node name or IP address for Apache host. Note that the loopback address (127.0.0.1) will only work for running the demo on your desktop. Use the network resolvable node name or IP address of the computer used. For (Apache) web servers utilizing virtual hosts (using Apache directive "VirtualHost"), the host name must be used. (V1.7) Default host name retrieved from CGI environment.
If undeterminable it will be set to 127.0.0.1
WebServerPort Specify port number to be used for hyperlinks if different than that used to access the aWebDap cgi. Defaults to port used to initially access aWebDap cgi. Rarely used. Https or any defined port wil be automatically recognized and used. (V1.7) Default port number retrieved from CGI environment. Default port is the port used to access awebdap. If it is a defined service in the file /etc/services, the service name is used in the link. Specify nothing or an integer.
CgiBinPath Specify CGI relative path as viewed in the URL by client (NOT the path on the local machine). Typically cgi-bin/ (Note use of terminating "/") (V1.7) cgi-bin/
LdapServer Specify node name or IP address for LDAP host. Note that the loopback address (127.0.0.1) will only work for running the demo on your desktop. Use the network resolvable node name or IP address of the computer used. AWebDap and the LDAP server do not need to reside on the same system. AWebDap can access a remote LDAP server. 127.0.0.1
LdapPort Option to specify a non regular LDAP port. This will break the ldap URL (if used) which relies on the prefix "ldap://" and a default port assignment. (V1.7) 389
SearchBase LDAP search base used for queries "o=orgname" (V1.2 now requires entire LDAP definition) (required)
V1.7 Appended to the DN defined by "DefineAddDn". (Does not affect "AddAttribute" entries. Each must be individually defined.)

AddFilter Depricated
Use FilterPrefix (V1.9)
LDAP filter string to add using AND logic. This entry is added to the LDAP search filter. (i.e. (&(objectclass=inetOrgPerson)(...)) ) If NULL, it is ignored. (V1.5) NULL
FilterPrefix
FilterSuffix
LDAP filter string to add using AND logic. This entry is added to the LDAP search filter. (i.e. (&(objectclass=inetOrgPerson)(...)) ) If NULL, it is ignored. (V1.9)
  • Filter Prefix, No search Suffix:
    &(search-prefix)(web-form-search-term)
  • Filter Suffix but no Prefix:
    &(web-form-search-term)(search-suffix)
  • Filter Prefix and Suffix:
    &(&(search-prefix)(web-form-search-term))(search-suffix)
NULL
IgnoreType LDAP Object type to ignore. This LDAP object type is ignored during search. (i.e. organizationalRole) (advisable but not required) (V1.5) NULL
UpdateDnInput T/F (V1.4)
If "T" then LDAP bind "DN" input entry box is generated on the HTML update/modify form. The input entry given is combined with the SearchBase directive to construct the LDAP DN. (i.e. cn=input-user-id,SearchBase User enters only the input-user-id)
If "F" then bind DN specified by BindDn directive is used for update/modify.
F(alse)
UpdateDefaultDisplayDn T/F Useful only if directive UpdateDnInput is "T". (V1.4)
If "T" then LDAP bind "DN" entry box on the HTML update/modify form is pre-filled with the text specified by the directive DefaultDisplayDn.
If "F" then HTML entry box for user ID/bind DN is blank.
T(rue)
DefaultDisplayDn (V1.4) Useful only if directive UpdateDefaultDisplayDn is "T". This value is combined with the SearchBase directive to construct the LDAP DN. (i.e. cn=DefaultDisplayDn,SearchBase)
BindDn (i.e. cn=admin,o=orgname) LDAP bind "dn" (Distinguished name) for database connection, access and management. The actual LDAP DN is given. It is used as-is and not constructed into another form.
UpdatePassword T/F (V1.4)
If "T" then password entry box is generated on the HTML update/modify form and a password is required for LDAP update.
If "F" then specify password to be used is given using the directive BindPw.
T(rue)
BindPw (V1.4) This sets a default LDAP bind password so no password is needed for updates.
ReadPassword T/F Used for non-anonymous/anonymous LDAP read.(V1.4) The LDAP database security is not defined here. This is just the information on the method of LDAP access for aWebDap.
If "T" then Password required for read. Define bind info with the ReadBindDn and ReadBindPw directives.
If "F" then an anonymous bind is performed to read the LDAP database.
F(alse)
ReadBindDn LDAP bind "dn" to use for non-anonymous read. (V1.4)
ReadPassword must be "T"

ReadBindPw Password to use for LDAP bind for non-anonymous read. (V1.4)
ReadPassword must be "T"

SortResultsBy Search results sorted by LDAP attribute specified. cn
InfoDisplayName Depricated
Use "InfoDisplayNumberOfConcatenationAttributes" to express attributes used.
This directive is ignored as of version 1.10 Default option: "default" (or NULL)
(Default will use LDAP attribute specified by the first "field" statement.)
InfoDisplayNickName Depricated
Use "InfoDisplayNumberOfConcatenationAttributes" to express attributes used.
This directive is ignored as of version 1.10
InfoDisplayNumberOfConcatenationAttributes Define number of LDAP attributes used to define the name to be displayed in the first search results collumn and the data listing title at top of "Info" page, or default or "0" to ignore this feature and do not display a data listing title. Specify "1" to use the first field after the "cn" as the first collumn in the search results and for the display name on the info page. The number specified for this directive defines the number the "field" attributes to be concatenated. If "2" is specified and the first two "field" attributes listed are "givenname" and "sn", then the first field of the search results will be the "givenname" and "sn" separated by a single space. (V1.10) Default option: "0"
InfoDisplayCommaAfterAttributeNumber Display a comma after the nth attribute specified by this directive. Numbering starts with "1" for the first attribute. (V1.10) Default: "0"
(Default will not display a comma.)
AllowURLAccess T/F (True/False) Generate hyperlink which is an LDAP URL for the first collumn of search results if defined with the directive "InfoDisplayNumberOfConcatenationAttributes" (>0). This directive is ignored otherwise. This interfaces well with the address book in MS/Outlook. This feature is only useful where anonymous read access of the LDAP database is allowed. Also works with Netscape versions 4.5 - 4.7 T(rue)
UpdateModify T/F Generate and display column and hyperlink for database information modification. T(rue)
UpdateModifyTrigger T/F Write update info to a file and execute script. If "T" then you must specify UpdateModifyTriggerScript. If data file (UpdateModifyTriggerData) is specified, then data file is used as a command line argument to the script. (V1.3) F(alse)
UpdateModifyTriggerScript File name (full path) of script to execute. Script executed after LDAP update. (V1.3)
UpdateModifyTrigger must be "T".

UpdateModifyTriggerData File name (full path) of data file generated by aWebDap from update/modify form data. This is a CSV file of the HTML form data. Data is written in the same order as field definitions in configuration file. (V1.3)
UpdateModifyTrigger must be "T".

DisplayFullInfoLink T/F Generate and display column and hyperlink for database information display. (V1.7 has spelling change) T(rue)
DeleteEntry T/F Generate and display column and hyperlink for the deletion of a database entry. F(alse)
VcardOrgName Organization name displayed in vCARD
Example: VcardOrgName:Stooges.org:

DisplayVcard T/F Generate and display column and hyperlink to a vCARD for search results.
Example: DisplayVcard:T:
T(rue)
DisplayMapURL Display a URL to a Map on search results page:
  • T/F Generate and display column and hyperlink to a Map.
  • http prefix: T/F (True/False) if hyperlink will be prefixed with "http://"
  • Name/prefix/domain of service. Only "www.mapquest.com/", "maps.yahoo.com/" (v1.8b) and "maps.google.com/" (v1.9) are currently supported.
  • Link text: Text to be displayed in the hyperlink.
  • LDAP attribute for country.
  • LDAP attribute for zipcode.
  • LDAP attribute for state.
  • LDAP attribute for city.
  • LDAP attribute for street address.
Constructs URL from domain supplied and LDAP atributes. i.e. "postalAddress", "l", "st", "postalcode" and "c" if provided.
Example: DisplayMapURL:T:T:maps.google.com/:Map:c:postalcode:st:l:postalAddress:
F(alse)
AddRuleMIperiod T/F LDAP db additions only. Add a period to middle initials if that field is populated by a single letter. Applies to LDAP attribute middlename only. Note that this may have to be added to your Object schema before it can be used. This will be applied to the construction of the DN and CN with the directives DefineAddDn and DefineAddCn. (V1.3) F(alse)
DefineAddDn Define the attributes used to construct the DN used for LDAP directory additions. Multiple statements allowed and probably required. Required for LDAP additions. i.e. dn: cn=Moe Howard,ou=MemberGroupA,o=stooges. If "SearchBase" is ",o=stooges" then define the DN as constructed from the attributes cn, ou and by default the "SearchBase" will be appended. (V1.7)
DefineAddCn Define the attributes used to construct the CN. Multiple statements allowed. Required for LDAP additions. (V1.7)
ObjectClass Used to describe LDAP schema for entry addition to the directory. Multiple statements allowed. At least four "objectClass" statements required for inetOrgPerson definition: top, person, organizationalPerson, inetOrgPerson. (ObjectClass required for LDAP additions)
UrlAttribute Generate hyperlink to a URL stored in LDAP: Define an LDAP attribute to be a URL hyperlink and anchor text. The LDAP attribute specified will be used to construct a URL hyperlink. (V1.8)
  1. attribute: Specify the LDAP attribute used in the generation of a hyperlink
  2. http prefix: T/F (True/False) if hyperlink will be prefixed with "http://"
  3. prefix: This is prefixed to the LDAP attribute.
  4. Link text: Text to be displayed in the hyperlink
Examples:
  • UrlAttribute:photoFile:T:your-domain.com/:Photo:
    Generates: <a href="http://your-domain.com/attribute-data">Photo</a>
  • UrlAttribute:homePage:F::Home Page:
    Generates: <a href="attribute-data">Home Page</a>
    (This works if the data is stored as a URL in the LDAP attribute "homePage")

ImgAttribute Embed an image in the info display page described by "field": Define an LDAP attribute to be a HTML "img" embeded image source tag. The LDAP attribute specified will be used to generate a image on the aWebDap dsiplay page. (V1.8)
  1. ldapAttribute: Specify the LDAP attribute used in the generation of a "<img src=" HTML tag.
  2. http prefix: T/F (True/False) if hyperlink will be prefixed with "http://"
  3. prefix: This is prefixed to the LDAP attribute.
  4. Link text: Text to be used in the "alt=" portion of the tag.
Examples:
  • ImgAttribute:photoFile:T:your-domain.com/:Photo:
    Generates: <img src="http://your-domain.com/attribute-data">Photo</a>
  • ImgAttribute:badgePhoto:F::Badge Photo:
    Generates: <img src="attribute-data" alt="Badge Photo">
    Entire URL of image to be displayed is held in LDAP.

WtaiAttribute Four fields to make the cell phone WTAI interface available for the LDPA attribute specified. Field:
  1. LDAP attribute to which this applies
  2. Support "Dial" (T/F)
  3. Support "Soft key" to dial using a soft key (T/F)
  4. Support interface to add entry to local cell phone address book (T/F)
Example: WtaiAttribute:telephoneNumber:T:F:T:
Note: Specify only one LDAP attribute per display page for "Soft key" support. The "Soft Key" can only apply to one item as there is only one soft key on the phone. (V1.8)

AddAttribute Three fields used to describe LDAP schema for entry addition to the directory. Multiple statements allowed and probably required.
  1. State the HTML form name for the item.
  2. The LDAP attribute defined.
  3. This field states if data must be provided T/F.
Each must be defined even if you feel this has been defined elsewhere. There must be one HTML form entry for each "AddAttribute". Hidden form entries can be used where the definition is known. (V1.7)

field Attributes described in table below. Multiple field statements allowed. At least four required.

Note:

The field directive: This defines the aWebDap properties for the LDAP attribute for aWebDap search and display.

The first four aWebDap field statements must be ordered and stated in the following order:

  1. cn - common name
  2. displayname
  3. sn - Surename
  4. givenname - First name

Support for these four fields is hard coded within aWebDap.

Field directive arguments: field:argument 1:argument 2:argument 3:...:argument 13:

Argument Number Values Description
1 field The aWebDap keyword field
2 LDAP attribute LDAP attribute name as defined by the LDAP schema.
3 T/F True/False: Prefix the search query filter with a "*"
4 T/F True/False: Postfix the search query filter with a "*"
5 Display name The display name of the LDAP attribute as presented by aWebDap on the web page.
6 HTML form name This is the "option value" for the selection presented on the first form and used for the first LDAP directory query. This is case sensitive.
7 T/F Display attribute in search results.
8 T/F Display this attribute when displaying the information page.
9 T/F Display attribute in the attribute modification form. This allows this data field to be modified.
10 integer number The field length or "size" of the text input field on the HTML form. Set to "0" if not used.
11 integer number The field "maxlen" value of the text input field on the HTML form. Set to "0" if not used.
12 vCARD descriptor The vCARD descriptor for the field is placed here. If none is specified then this field is not added to the vCARD.
13 T/F Field is written to CSV (Comma Separated Variables) trigger data file. (V 1.3)


The sample awebdap.conf file is configures to match the LDAP database described by the LDIF files and configuration presented in the YoLinux LDAP quick start example.

Note that this sample shows a configuration file supporting three web interfaces and two domains. Only the first "DOMAIN1" is needed to support the HTML form above.

program:awebdap:
version:1.10:

START:DOMAIN1: 
OrgName:Stooges:org:
PageType:HtmlExtra:
OrgLogo:/images/aWebDap-logo.gif:
CSS:/stooges.css:
OrgContact:webmaster@your-domain.com:
TechContact:webmaster@your-domain.com:
UrlReturnLink:stooges.html:
VcardOrgName:Stooges.org:
CgiBinPath:cgi-bin/:
WebServer:127.0.0.1:
LdapServer:127.0.0.1:
LdapPort:389:
SearchBase:o=stooges:
FilterPrefix:objectclass=inetOrgPerson:
IgnoreType:organizationalRole:
UpdateDnInput:F:
UpdateDefaultDisplayDn:T:
DefaultDisplayDn:StoogeAdmin:
BindDn:cn=StoogeAdmin,o=stooges:
ReadPassword:F:
UpdatePassword:T:
AllowURLAccess:T:
DisplayVcard:T:
UpdateModify:T:
UpdateModifyTrigger:F:
DeleteEntry:F:
DisplayFullInfoLink:T:
SortResultsBy:sn:
InfoDisplayNumberOfConcatenationAttributes:2:
InfoDisplayCommaAfterAttributeNumber:1:
ImgAttribute:destinationindicator:T:www.threestooges.com:Display Photo:
DisplayMapURL:T:T:maps.google.com/:Map::postalcode:st:l:postalAddress:
#
#field: ldap-field : 
#       Filter wildcard prefix T/F : 
#       Filter wildcard post T/F : 
#       Display-name : 
#       HTML Form name (search form)(Case sensitive. Form must match case in this config file) : 
#       Display T/F : 
#       Info-Display T/F : 
#       Modify T/F : 
#       Modify-field-length (0 if not stated) : 
#       max-length (0 if not stated) : 
#       Vcard-name
# Must have first field entry "cn": (Not editable! Displayed by default)
#   cn - common name
field:cn:T:T::personname:F:F:F:0:0::F:
#
# The following values may be edited, displayed etc
#field:displayname:F:F:Person (LDAP URL)::T:F:F:0:0:fn:F:
field:sn:T:T:::F:F:F:0:0:n:F:
field:givenname:T:T:::F:F:F:0:0:+n:F:
field:mail:F:F:E-Mail Address::T:T:T:32:50:email;internet:F:
field:homephone:F:F:Home Phone::T:T:T:14:20:tel;home:F:
field:telephonenumber:F:F:Work Phone::T:T:T:14:20:tel;work:F:
field:mobile:F:F:Mobile Phone::F:T:T:14:0:tel;cell:F:
field:postalAddress:F:F:Street Address::F:T:T:32:50:adr:F:
field:l:T:T:Locality/City:residentofl:F:T:T:20:50:+adr:F:
field:st:F:F:State/Province:residentofstate:F:T:T:4:24:+adr:F:
field:postalcode:F:T:Postal Code:residentofpostalcode:F:T:T:12:0:+adr:F:
field:destinationindicator:F:F:Photo::F:T:T:32:50::F:

START:ADMIN1: 
OrgName:Stooges:org:
PageType:HtmlExtra:
BackgroundColor:#d0d0d0:
TextColor:#000000:
OrgContact:webmaster@your-domain.com:
TechContact:webmaster@your-domain.com:
VcardOrgName:Stooges.org:
CgiBinPath:cgi-bin/:
LdapServer:127.0.0.1:
LdapPort:389:
SearchBase:o=stooges:
FilterPrefix:objectclass=inetOrgPerson:
IgnoreType:organizationalRole:
UpdateDnInput:F:
UpdateDefaultDisplayDn:T:
DefaultDisplayDn:StoogeAdmin:
BindDn:cn=StoogeAdmin,o=stooges:
ReadPassword:F:
UpdatePassword:T:
AllowURLAccess:T:
DisplayVcard:F:
UpdateModify:T:
UpdateModifyTrigger:F:
AddRuleMIperiod:T:
DeleteEntry:T:
DisplayFullInfoLink:T:
SortResultsBy:sn:
InfoDisplayNumberOfConcatenationAttributes:2:
InfoDisplayCommaAfterAttributeNumber:1:
#
DefineAddDn:cn:
DefineAddDn:ou:
#DefineAddDn:o:
DefineAddCn:givenname:
DefineAddCn:middlename:
DefineAddCn:sn:
#
ObjectClass:top:
ObjectClass:person:
ObjectClass:organizationalPerson:
ObjectClass:inetOrgPerson:
#
AddAttribute:fmsn:sn:T:
AddAttribute:fmgivenname:givenname:T:
AddAttribute:fmmiddleinitial:middleinitial:F:
#AddAttribute:fmo:o:T:
AddAttribute:fmou:ou:T:
AddAttribute:fmst:st:F:
#
field:cn:T:T::personname:F:F:F:0:0:fn:F:
#
#field:displayname:F:F:Person::T:T:T:0:0:fn:F:
field:sn:T:T:::F:F:F:0:0:n:F:
field:givenname:T:T:::F:F:F:0:0:+n:F:
field:mail:F:F:E-Mail Address::T:T:T:32:50:email;internet:F:
field:homephone:F:F:Home Phone::T:T:T:14:20:tel;home:F:
field:description:F:F:Spouse Name::F:T:T:14:0::F:
field:businesscategory:F:F:Company Name::T:T:T:14:40::F:
field:telephonenumber:F:F:Work Phone::T:T:T:14:20:tel;work:F:
field:mobile:F:F:Mobile Phone::F:T:T:14:0:tel;cell:F:
field:postalAddress:F:F:Street Address::F:T:T:32:50:adr:F:
field:l:T:T:Locality/City:residentofl:F:T:T:20:50:+adr:F:
field:st:F:F:State/Province:residentofstate:T:T:T:4:24:+adr:F:
field:postalcode:F:T:Postal Code:residentofpostalcode:F:T:T:12:0:+adr:F:
field:destinationindicator:F:F:Photo::F:F:T:32:50::F:

START:DOMAIN2: 
OrgName:Delta:org:
PageType:HtmlExtra:
BackgroundColor:#ffffff:
TextColor:#000000:
OrgContact:webmaster@Delta.org:
TechContact:webmaster@your-domain.com:
VcardOrgName:Delta.org:
CgiBinPath:cgi-bin/:
WebServer:127.0.0.1:
LdapServer:127.0.0.1:
LdapPort:389:
SearchBase:o=delta:
FilterPrefix:objectclass=inetOrgPerson:
IgnoreType:organizationalRole:
UpdateDnInput:F:
UpdateDefaultDisplayDn:T:
DefaultDisplayDn:DeanWormer:
BindDn:cn=DeanWormer,o=delta:
ReadPassword:F:
UpdatePassword:T:
AllowURLAccess:T:
DisplayVcard:T:
UpdateModify:T:
UpdateModifyTrigger:F:
DeleteEntry:F:
DisplayFullInfoLink:T:
SortResultsBy:sn:
InfoDisplayNumberOfConcatenationAttributes:2:
InfoDisplayCommaAfterAttributeNumber:1:
#
field:cn:T:T::personname:F:F:F:0:0:fn:F:
#
#field:displayname:F:F:Person::T:T:F:0:0:fn:F:
field:sn:T:T:::F:F:F:0:0:n:F:
field:givenname:T:T:::F:F:F:0:0:+n:F:
field:uid:F:F:Year:graduatingyear:T:T:F:0:0::F:
field:employeetype:F:F:Status (P,S,A,D)::F:T:T:1:0::F:
field:mail:F:F:E-Mail Address::T:T:T:32:50:email;internet:F:
field:homephone:F:F:Home Phone::T:T:T:14:20:tel;home:F:
field:telephonenumber:F:F:Work Phone::T:T:T:14:20:tel;work:F:
field:mobile:F:F:Mobile Phone::F:T:T:14:0:tel;cell:F:
field:postalAddress:F:F:Street Address::F:T:T:32:50:adr:F:
field:l:T:T:Locality/City:residentofl:F:T:T:20:50:+adr:F:
field:st:F:F:State/Province:residentofstate:F:T:T:4:24:+adr:F:
field:postalcode:F:T:Postal Code:residentofpostalcode:F:T:T:12:0:+adr:F:


Note that the ADMIN1 configuration will display an extra table field for a hyperlink to delete an entry.


More HTML Form Examples:

Sample HTML form for ADMIN1:

<html>
<head>
<title>Administer Stooges Family Directory</title>
</head>
<body bgcolor="#ffffff" text="#000000">
    <p>
    <hr width=65%>
    <p>
    <center>
       <h1>Administer Stooges Family Directory</h1>
    </center>
    <p>
    <hr width=65%>
    <p>
    <form method="post" action="/cgi-bin/awebdap.cgi">
    <select name="selectoption">
       <option value="personname">Name contains:
       <option value="residentofl">Lives in the city of:
       <option value="residentofpostalcode">Postal code begins with:
       <option value="residentofstate">Lives in the state of:
    </select>
    <input type="hidden" name="type" value="query">
    <input type="hidden" name="awebdapdomain" value="ADMIN1">
    <input type="TEXT" name="searchfor">
    <input type="submit" value="Submit">
    </form>
    <p>
</body>
</html>

Note that the ADMIN1 configuration will display a an extra table field for a hyperlink to delete an entry. The vCARD column was not displayed as it does not seem like a feature that would be used by an administrator. Of course aWebDap is completely configurable to do whatever you like.

Person E-Mail Address Home Phone Company Name Work Phone State/Province More Info Modify Delete
Fine, Larry LFine@isp.com 800-555-1313 ABC Inc. (800)555-1212 TX Display Modify Delete
Howard, Moe MHoward@isp.com 800-555-1313 XYZ Inc. none TX Display Modify Delete
Howard, Curley CHoward@isp.com 800-555-1313 IJK Inc. none TX Display Modify Delete


Sample HTML form for ADMIN1 domain and LDAP entry addition:

<html>
<head>
<title>Stooges Directory</title>
</head>
<body bgcolor="#ffffff" text="#000000">
    <p>
    <hr width=65%>
    <p>
    <h3>Add an entry</h3>
<form method="post" action="/cgi-bin/awebdap.cgi">
<input type="hidden" name="adddn" value="ADDDN">
<input type="hidden" name="awebdapdomain" value="ADMIN1">
<table cellspacing="2" cellpadding="2" >
<tr><td>Last Name:</td><td><input type="text" name="fmsn" size="32"></td></tr>
<tr><td>First Name:</td><td><input type="text" name="fmgivenname" size="32"></td></tr>
<tr><td>Organizational Unit/Group:</td>
<td><select name="fmou">
    <option value="MemberGroupA">MemberGroupA
    <option value="MemberGroupB">MemberGroupB
    </select>
</td></tr>
<tr><td>State/Province:</td><td><input type="text" name="fmst" size="2"></td></tr>
</table>
<p>
Password: <input type="password" name="addpassword">  
<input type="submit" value="Add User Data">
</form>
<p>
</body>
</html>
          

Note:


Sample HTML form for DOMAIN2:

<html>
<head>
<title>Delta House Directory</title>
</head>
<body bgcolor="#ffffff" text="#000000">
    <p>
    <hr width=65%>
    <p>
    <center>
       <h1>Delta House Directory</h1>
    </center>
    <p>
    <hr width=65%>
    <p>
    <h3>Phone Book and Contact Database</h3>
    <p>
    <form method="post" action="http://localhost/cgi-bin/awebdap.cgi">
    <select name="selectoption">
       <option value="graduatingyear">Graduation Year:
       <option value="personname">Name contains:
       <option value="residentofl">Lives in the city of:
       <option value="residentofstate">Lives in the state of:
    </select>
    <input type="hidden" name="type" value="query">
    <input type="hidden" name="awebdapdomain" value="DOMAIN2">
    <input type="TEXT" name="searchfor">
    <input type="submit" value="Submit">
    </form>
    <p>
</body>
</html>


vCARD support:

The following are the vCARD directives used to describe LDAP entries:

LDAP field vCARD directive
cn FN
sn N
title TITLE
mail EMAIL;PREF;INTERNET
EMAIL;INTERNET
homePhone TEL;VOICE;HOME
TEL;HOME
telephoneNumber TEL;WORK
mobile TEL;CELL
facsimileTelephoneNumber TEL;FAX;WORK
postalAddress
l
st
postalCode
ADR;TYPE=WORK
ADR
homePostalAddress ADR;TYPE=HOME
description NOTE
labeledURI URL

The aWebDap directive VcardOrgName in /etc/awebdap.conf is used to define the vCARD directive org.


Using Trigger Scripts:

The following is a trigger script I use to email updates to someone who cares. The script e-mails the CSV output data file which contains the information from an update to a single record. The script could have been written to perform a SQL database update or anything you want. To invoke this feature, the following has to be set in the file: /etc/awebdap.conf

Sample shell script: /opt/bin/aWebDapTrigger.sh

#!/bin/sh
# Uses package metamail
/usr/bin/metasend -b -F "Webmaster <Webmaster@domain.org>" -s "LDAP database updated" \
                  -t larry@isp.org -c curley@isp.net -e 7bit  -m "text/plain" \
                  -f /opt/etc/aWebDapTriggerGreeting.txt -n  -m "text/plain" -f $1
  
OR
#!/bin/sh
# Uses package mailx
/usr/bin/mailx -a "Webmaster <Webmaster@domain.org>" -s "LDAP database updated" \
               -c larry@isp.org curley@isp.net < $1
  
OR
#!/bin/sh
# Uses package mailx
cat /opt/etc/aWebDapTriggerGreeting.txt $1 | /usr/bin/mailx -a "From: Webmaster <Webmaster@domain.org>" \
                  -s "LDAP database updated" \
                  -c curley@isp.net larry@isp.org 
  

Set SELinux permissions:


Other aWebDap configurations:


Changelog:

Change Log


Purchase Commercial version of aWebDap online:

Purchase supported "premium" version: (more features: add images (i.e. corporate logo), set background colors, ...)


Return to http://YoLinux.com home page
Return to YoLinux Tutorial Index
Return to YoLinux LDAP Tutorial
Feedback Form

Copyright © 2001 - 2008 by Greg Ippolito