Difference between revisions of "Cool Solution - Webcalendar"

From Univention Wiki

Jump to: navigation, search
Line 119: Line 119:
=== Web Installation ===
=== Web Installation ===
* You can now open your Web browser to, create the settings file password and finish the set-up steps.
* You can now open your Web browser to, create the settings file password and finish the set-up steps (click on each image to see more).
[[File:webcalendar-UCS4-install-step0OK.png|340px|thumb|Install wizard]]
[[File:webcalendar-UCS4-install-step0OK.png|340px|Install wizard]]
* Install the database (See database setup image)
* Install the database (See image for an example)
[[File:webcalendar-UCS4-install-step2OK.png|340px|thumb|Database setup]]
[[File:webcalendar-UCS4-install-step2OK.png|340px|Database setup]]
* Save the settings and Launch the WebCalendar
* Save the settings and Launch the WebCalendar
[[File:webcalendar-UCS4-install-step4OK.png|340px|thumb|LDAP settings]]
[[File:webcalendar-UCS4-install-step4OK.png|340px|LDAP settings]]
* Login with any UCS Domain username
* Login with any UCS Domain username
[[File:webcalendar-UCS4-calendar.png|340px|thumb|Calendar home]]
[[File:webcalendar-UCS4-calendar.png|340px|Calendar home]]
=== UMC integration ===
=== UMC integration ===

Revision as of 16:57, 24 March 2016

Produktlogo UCS Version 4.1

Note: Cool Solutions are articles documenting additional functionality based on Univention products. Not all of the shown steps in the article are covered by Univention Support. For questions about your support coverage contact your contact person at Univention before you want to implement one of the shown steps.

Also regard the legal notes at Terms of Service.


This article describes a way to install Webcalendar in UCS and to integrate it in a UCS domain (LDAP directory) as a company's calendar.

Webcalendar is a Web application "that can be configured as a single-user calendar, a multi-user calendar for groups of users, or as an event calendar viewable by visitors" See link to Webcalendar.

How is a calendar useful?

A digital calendar is not simply to see the date, nowadays a calendar is mainly expected to provide a personal agenda, where you can manage your list of appointments (or an assistant for you). It can also be used as a time management tool, or in a collaborative environment, to see the events of your team (or simply their availability), your partners or even your customers. More generally, a Web calendar can also be used to share the public events of the company to anyone interested.


The following sections describe the packages needed, the basic settings to get the Web installation wizard and the modifications to integrate it in the LDAP directory.

The examples are based the following environment, you need to adapt this to your network. For simplicity, here we are going to install the service and the database on the UCS Master.

Setting Example
IP Address UCS DC Master
Hostname of UCS DC Master (ldap/master) master.domain.com
LDAP port (ldap/master/port) 7389
Base DN (ldap/base) dc=domain,dc=com
LDAP DN of calendar users cn=users,dc=domain,dc=com
LDAP DN of calendar administrators cn=Enterprise Admins,cn=groups,dc=domain,dc=com
Webcalendar bind user uid=webcalendar,cn=users,dc=domain,dc=com
Database service Postgresql
Database name webcalendar
Database user webcalendarusr


  • Update UCS to the last errata.
root@master:# univention-upgrade --ignoressh --updateto=4.1-1 --noninteractive
  • Here we are going to use Postgresql

On UCS calendar server install the service and the database driver for PHP

root@master:# univention-install postgresql php5-pgsql
root@master:# su - postgres  
postgres@master:~$ createdb webcalendar
postgres@master:~$ createuser --no-createdb --no-adduser -R -P webcalendarusr

You will be prompted for the password of the database user. Logout from postgres session afterwards.

  • Create a LDAP user for binding the service to LDAP
WEBCALPW=$(makepasswd --chars 20)
udm users/user create \
 --position="cn=users,$(ucr get ldap/base)" \
 --option posix  --set lastname=Service --set username=webcalendar \
 --set primaryGroup="cn=Domain Users,cn=groups,$(ucr get ldap/base)" \
 --set shell=/usr/sbin/nologin --set unixhome=/dev/null  --set password="${WEBCALPW}" --set overridePWLength=1 --set overridePWHistory=1

Make sure not to lose the $WEBCALPW password, it will be needed to set the bind in Webcalendar user-ldap.php configuration file.

Optionally, you can create a group for calendar users and calendar Administrators, in case you don't want to use the default UCS groups


Download latest release

Download the latest release from sourceforge.

wget https://sourceforge.net/projects/webcalendar/files/webcalendar%201.2/1.2.7/WebCalendar-1.2.7.tar.gz/download -O webcalendar.tar.gz
tar zxvf webcalendar.tar.gz -C /var/www/
mv /var/www/WebCalendar-1.2.7 /var/www/calendar
chown -R www-data:www-data      /var/www/calendar/includes

If your are not going to use LDAP, you can now open your Web browser to Otherwise see next section.

LDAP Integration

The Install wizard offers further documentation. For example see appendix E "How To Configure for LDAP"

  • Edit user-ldap.php file

vi /var/www/calendar/includes/user-ldap.php

------ LDAP General Server Settings ------
// Name or address of the LDAP server
  For SSL/TLS use 'ldaps:localhost'
$ldap_server = 'master.domain.com';
// Port LDAP listens on (default 389)
$ldap_port = '7389';
// base DN to search for users
$ldap_base_dn = 'cn=users,dc=domain,dc=com';
// Account used to bind to the server and search for information.
// This user must have the correct rights to perform search.
// If left empty the search will be made in anonymous.
// * We do NOT recommend storing the root LDAP account info here *
$ldap_admin_dn = 'uid=webcalendar,cn=users,dc=domain,dc=com';  // user DN
$ldap_admin_pwd = 'GJozreHG7KIbKfSQx0IC'; // user password ($WEBCALPW)
------ Admin Group Settings ------
// A group name (complete DN) to find users with admin rights
$ldap_admin_group_name = 'cn=Enterprise Admins,cn=groups,dc=domain,dc=com';

Web Installation

  • You can now open your Web browser to, create the settings file password and finish the set-up steps (click on each image to see more).

Install wizard

  • Install the database (See image for an example)

Database setup

  • Save the settings and Launch the WebCalendar

LDAP settings

  • Login with any UCS Domain username

Calendar home

UMC integration

Set the following variables to have a link to the calendar in the Univention Management Console:

ucr set ucs/web/overview/entries/service/calendar/description/de="Zugriff auf den Kalender" \
 ucs/web/overview/entries/service/calendar/description="Access to the calendar" \
 ucs/web/overview/entries/service/calendar/icon="/calendar/icons/example.gif" \
 ucs/web/overview/entries/service/calendar/label/de="Calendar" \
 ucs/web/overview/entries/service/calendar/label="Calendar" \
 ucs/web/overview/entries/service/calendar/link="/calendar/" \


Please visit the README.html page for further information about everyday usage of the tool, see link to readme. See also calendars or the user manual


First of all, make sure that all the settings in the settings table given in the beginning correspond with their respective entries in both settings.php and user-ldap.php configuration files.

  • Test LDAP connection
ldapsearch -h $(ucr get ldap/master) \
 -p $(ucr get ldap/master/port) \
 -x -D "uid=webcalendar,cn=users,$(ucr get ldap/base)" -w "${WEBCALPW}" \
 -b cn=users,$(ucr get ldap/base) \
 -LLL "(&(objectClass=person)(uid=*))" uid
  • To change application settings go to For example, you could set "User Authentication" to None (Single-User) and tick "Create Default Admin Account" to discard problems in other authentication methods. Save the settings and Launch the WebCalendar login page. test user 'admin', password 'admin'
  • It could be useful to have a look at the list of current bugs in Sourceforge.


Personal tools