Installing Roundcube password plugin in Virtualmin

Install a Roundcube Password plugin in Virtualmin

    1. Install the Roundcube script usually from Virtualmin dashboard by selecting server and then going into Install Scripts->Roundcube from the Available Scripts and install it the way you require by selecting the sub folder you wish to install
    2. Now Log into the server over SSH with the virtualmin username and password you created during creation of the virtual server. Go into the sub directory you just installed Roundcube script into. We are assuming you selected folder name as roundcube .Now navigate into path from server via SSH as
      cd /home/USERNAME/public_html/roundcube/
    3. Edit config/main.inc.php, and change this line:
      $rcmail_config['plugins'] = array('virtuser_file');

      To this line:
      $rcmail_config['plugins'] = array('virtuser_file', 'password');
    4. Setup the password plugin config file with the help of this command in SSH in the roundcube folder:
       cp plugins/password/config.inc.php.dist   plugins/password/config.inc.php
    5. Enable Virtualmin driver. To do that, go ahead and edit "plugins/password/config.inc.php", and change this line:
$rcmail_config['password_driver'] = 'sql';
      To this:
 $rcmail_config['password_driver'] = 'virtualmin';
  1. Compile C wrapper with this command ,If gcc is not installed,install it by using command if you are in Centos
    yum install gcc

    and then type
     gcc -o plugins/password/helpers/chgvirtualminpasswd plugins/password/helpers/chgvirtualminpasswd.c
  2. Permissions are required by roundcude password plugin to access and change virtualmin functions so enter
    chown root.VIRTUAL_SERVER_GROUP_NAME plugins/password/helpers/chgvirtualminpasswd 
     strip plugins/password/helpers/chgvirtualminpasswd 
    chmod 4550 plugins/password/helpers/chgvirtualminpasswd
  3. Fix syntax error in virtualmin.php driver by editing "plugins/password/drivers/virtualmin.php", and jump to line 54. You'll see a line with just "break". That line should end with a semicolon (;) character.The line should look like this:
    break;
  4. You should now be able to log into RoundCube, go into Settings -> Password, and change your user's roundcube password.

If you are having permission problems after installing Roundcube password plugin in virtualmin please follow the the next tutorial How to solve Roundcube Password plugin Permission problems in Virtualmin ?

cpanel,php,ssh,virtualmin