TOC

Synopsis

Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while logging the commands and arguments...

The primary functions of Sudo: #Create/delete domain directories on the fly, as domains are added/deleted #Create/delete user home and mail directories on the fly, as users are added/deleted #Copy cached files from web server to restricted user directories, such as mail filters and list of IMAP folders. #Report Spam/Ham to SpamAssassin?

It is very important that you have Sudo installed and configured correctly before attempting to install [[vMail.Admin]]. [[vMail.Admin]] will not work if Sudo is not install or is not configured correctly.

Installation

Sudo is a core dependancy of [[vMail.Admin]].

Sudo must be compiled with the following compile time option:

 ./configure
  --with-pam

Gentoo users

 USE="pam"
 
 $ emerge app-admin/sudo

Post installation

Files to be modified:

  • /etc/sudoers

sudoers

Visudo is the editor that comes bundled with Sudo. This editor must be used to modify your sudoers file. Do not use vi, nano nor any other editor.

To edit sudoers, execute the following command:

 $ visudo

Add the following parameters:

CORRECT

File: /etc/sudoers

Host_Alias HOST = YOUR_HOST_NAME
APACHE_USER HOST = NOPASSWD: /var/www/localhost/vma/includes/bin/, /var/www/localhost2/vma/includes/bin/

NOT CORRECT

File: /etc/sudoers

Host_Alias HOST = YOUR_HOST_NAME
APACHE_USER HOST = NOPASSWD: /var/www/localhost/vma/includes/bin, /var/www/localhost2/vma/includes/bin

Replace YOUR_HOST_NAME with your server's hostname and replace APACHE_USER with the user that runs the apache proccess. This is usually user apache. Be sure to add the trailing slash at the end of the path, else sudo will assume "bin" is a file, rather than a directory.

If you wish to run more than 2 instances of vMail.Admin, separate directories as shown above (comma then space). You may also list all of the perl scripts in includes/scripts individually. You will need to provide the entire path to each script (no trailing slash) and you will need to separate entries with a comma then space.