QUOTADM-0.0.2E(1)

NAME
quotadm - Show quota information of a particular user or all users, send warning email on threshold. The name is derived from "Quota Administration [QUOT(A A)DMinistration]".

SYNOPSIS
quotadm OPTION1 [OPTION2]

DESCRIPTION
This script shows user quotas in the system, and if "--email" is mentioned it will email a warning msg to users when the threshold is reached or exceeded.

Following are the options that the script currently accepts:

-u <username>
    Single user's quota information with threshold info. (-u=OPTION1, <username>=OPTIONS2)

--all-quota
    Show those user's quota information whose quota is on. (OPTION1)

--all
    Show all user's quota information. (OPTION1)

--email
    Email the user if he/she has reached/exceeded threshold for quota. (OPTION2)

--genmsg
    Generate the default email template in /etc/quotawarnuser.msg and /etc/quotawarnadmin.msg files. (OPTION1)

EXAMPLES
Examples of some OPTIONS:

Example 1: "quotadm -u tom" - will give a output like the following: UserName Usage(MB) Quota(MB) Usage(%) ThreshHold(%) Diff(+/-)

tom 52.75 58.59 90.03% 90% 0.03%-

Example 2: "quotadm -u tom --email" - will send an email to tom if his quota has reached or exceeded the threshold.

Example 3: "quotadm --all-quota --email" - will send an email to each user whose quota has reached or exceeded the threshold.

VARIABLES
The following variables in the script are configurable or must be configured in some systems:

$msgfile - Default: /etc/quotawarnuser.msg, this file contains the email that will be sent to the users whose quota has reached or exceeded $threshold. Inside this file you can use %user to mention the Username, %table to print the table of quota information, %quota to how much quota is assigned to the user.

$msgfileadmin - Default: /etc/quotawarnadmin.msg, this file contains the email that will be sent to the admin summarising all the users that have exceeded their threshold.

$mta - Default: /usr/lib/sendmail, this is where you set the location of your MTA. Currently, this script only supports SENDMAIL and QMAIL. If you are using QMAIL, please enter the location of your qmail-inject.

$echo - Default: /bin/echo, this is the location of the echo command which is used to send mail for QMAIL.

$threshold - Default: 90, this is the "high water mark" for the users. When user's disk usage equals/exceeds[>=] user's quota threshold, i.e. more than or equal to 90% of user's quota, then the script will send a warning message (/etc/quotawarnuser.msg) to the user. The message will be sent to user only once.

$sendadmin - If value is 1, then the script will send summary email to admin. If value is 0, then the script will not send the summary email.

$adminemail - Email address for administrator. The '@' should be preceeded with '\', so email address should look like: admin\@domain.com

README
quotadm is a user quota reporting tool. It can be used to get a table of users containing their quota usage, threshold limit, threshold usage etc. quotadm can also be used to send e-mail warning messages to the users' whose quota has reached near or over quota threshold.

FILES
/etc/quotawarnuser.msg This file contains the email that will be sent to the users whose quota has reached or exceeded $threshold. Inside this file you can use %user to mention the Username, %table to print the table of quota information, %quota to how much quota is assigned to the user.

/etc/quotawarnadmin.msg This file contains the email that will be sent to the admin summarising all the users that have exceeded their threshold.

REPORTING BUGS
Please report bugs to <zia at qalacom dor com> or <zia at zia dot info>

LICENSE
quotadm may be distributed under the same terms as Perl.

PREREQUISITES
Quota module for Perl - <http://search.cpan.org/CPAN/authors/id/T/TO/TOMZO/Quota-1.4.6.tar.gz>

OSNAMES
Any

SCRIPT CATEGORIES
UNIX/System_administration

AUTHOR
Written by Ziaur Rahman <zia at qalacom dot com>, <zia at zia dot info>

SEE ALSO
quota(1), quotactl(2), fstab(5), edquota(8), quotacheck(8), quotaon(8), repquota(8), convertquota(8)