August 17, 2010

How to add a virtual keyboard to Horde Webmail in Plesk 9.x

If you operate a web hosting provider and provide Horde based webmail access, I recommend providing a virtual keyboard in order for your users to enter their passwords securely.

A virtual keyboard is a software application which allows a user to enter characters via an onscreen keyboard. Unlike typing a password using a hardware keyboard, a virtual keyboard cannot be logged using a keystroke logger.

The follow instructions outline the process of adding a virtual keyboard to the webmail login interface. A example of this can be found at: http://webmail.md3v.com.

Note: These instructions have been tested on Plesk 9.5.2 with Horde 3.3.6.

1. Download my Virtual Keyboard build from: http://www.md3v.com/dl/Virtual_Keyboard.zip.

2.  Upload the “keyboard.css”, “keyboard.js” and “keyboard.png” files to your Plesk server.

3. Copy “keyboard.css”, “keyboard.js” and “keyboard.png” to:

/usr/share/psa-horde/imp

4. Make a backup of the original Horde login template:

cp /usr/share/psa-horde/imp/templates/login/login.html /usr/share/psa-horde/imp/templates/login/login.html~

5. Edit the login template:

nano -w /usr/share/psa-horde/imp/templates/login/login.html

6. At the top of the login.html file add:

<link rel=”stylesheet” href=”keyboard.css”>
<script src=”keyboard.js” charset=”UTF-8″></script>

7. Search the file (CTRL+W) for:

<input tabindex=”<tag:password_tabindex />” name=”pass” style=”direction:ltr” />

And replace it with:

<input tabindex=”<tag:password_tabindex />” name=”pass” style=”direction:ltr” lang=”en-us” />

8. Save the file and exit nano.

9. Test your webmail to confirm that the virtual keyboard is working.

NOTE: The code included in this post may not display correctly in your browser. You may download a copy of the instructions here.