root / pykota / trunk / README @ 741

Revision 741, 6.3 kB (checked in by jalet, 21 years ago)

Security warning added.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1# $Id$
2
3PyKota - Print Quota for CUPS
4
5(c) 2003 Jerome Alet <alet@librelogiciel.com>
6You're welcome to redistribute this software under the
7terms of the GNU General Public Licence version 2.0
8or, at your option, any higher version.
9
10You can read the complete GNU GPL in the file COPYING
11which should come along with this software, or visit
12the Free Software Foundation's WEB site http://www.fsf.org
13
14============================================================
15
16PyKota is a complete Print Quota system for the Common Unix Printing
17System (aka CUPS), which works by directly querying the printers
18for the number of pages they have printed.
19
20Actual working features :
21
22        - Per printer user quotas.
23       
24        - Automated email warning of users above quota to the
25          user himself and to the print quota administrator.
26       
27        - CUPS filter for quota accounting : pykota
28       
29        - Command line print quota editor : edpykota
30       
31        - Command line print quota report generator : repykota
32       
33        - Command line print quota automated warning sender : warnpykota
34       
35        - Centralized storage of quotas : you can manage quotas for
36          different printers on different print servers and store them all
37          on the same quota storage server.
38          WARNING : actually all your printers must have an unique name,
39                    but this may change in a future version.
40                   
41        - SNMP querying of any networked SNMP-enabled printer.           
42       
43        - Special scripts included for a seamless integration of
44          PyKota on Debian machines.
45         
46All the command line tools accept the -h | --help command line option
47which prints all the available options and show usage examples.
48       
49Planned features are described in the TODO file.
50
51Actually only the lazy quota method is implemented. What do I call
52lazy method ?
53
54  The lazy method consists in querying the printer (actually via SNMP)
55  for its total pages counter, just before the beginning of a job, and
56  use this to modify the *preceding* user's quota. So you're
57  always late of one print job, but this is generally ok, especially
58  because a check is also done to see if the current user is allowed
59  or not to print.
60 
61  Problem may arise however in batches on successive print jobs
62  by different users when there's no sleep time between two jobs :
63  the used pages may be attributed to incorrect user. This
64  depends on the printer speed and time between jobs.
65 
66  Other querying methods which won't suffer from this problem,
67  but probably from other ones ;-) will be implemented in the
68  future.
69 
70PyKota is known to work fine with HP Laserjet 2100 and 2200   
71networked printers, and should work with any SNMP-enabled
72network printer capable of outputing its lifetime printed pages
73number.
74
75============================================================
76
77INSTALLATION:
78=============
79
80Prerequisite :
81--------------
82   
83  You need to have the following tools installed on the CUPS Server :
84 
85    - CUPS
86    - Python
87    - eGenix' mxDateTime Python extension
88    - PostgreSQL's PygreSQL Python extension and the PostgreSQL client
89      libraries.
90    - SNMP tools (specifically the snmpget command)
91   
92  You need to have the following tools installed on the Quota Storage 
93  Server :
94 
95    - PostgreSQL
96   
97  PygreSQL and the PostgreSQL client libraries's versions on the CUPS
98  Server must match the PostgreSQL version used on the Quota Storage
99  Server.
100 
101  Of course the CUPS Server and the Quota Storage Server can be the 
102  very same machine.
103 
104  This list of prerequisite software may change in the future, when
105  PyKota will support more functionnalities you will be given
106  alternatives.
107 
108Then :   
109------
110 
111Download the latest PyKota version from the CVS tree on :
112
113    http://savannah.nongnu.org/projects/pykota
114
115Just type :
116
117    python setup.py install
118
119You may need to be logged in with sufficient privileges (e.g. root)
120
121Go to the initscripts subdirectory of PyKota's sources, and choose
122the appropriate storage backend for your configuration. Read
123the associated README file and execute the initialization script
124to create an empty PyKota Storage.
125
126Copy the conf/pykota.conf.sample sample configuration file to
127CUPS' configuration directory, usually /etc/cups, under the
128name pykota.conf, and adapt this file to your own needs and
129configuration.
130
131Modify the PPD files for each printer on which you want to manage
132print quotas, for example /etc/cups/ppd/lp.ppd :
133
134--- Add the line below exactly as-is somewhere near the top ---
135*cupsFilter:  "application/vnd.cups-postscript 0 /usr/bin/pykota"
136--- Add the line above exactly as-is somewhere near the top  ---
137
138Modify the path to the pykota executable if needed, unfortunately
139you have to supply the correct absolute path here due to CUPS
140internals, or put the pykota executable into /usr/lib/cups/filter
141instead of into /usr/bin.
142
143Do this for each ppd file present in this directory if you want
144to enable quota on every printer.
145         
146Add printers and users to the quota system and set their quota values :
147
148    $ edpykota --add -P printer -S softlimit -H hardlimit user1 ... userN
149       
150    launching edpykota without any argument or with the --help
151    command line option will show you all the possibilities.
152
153Restart CUPS, for example under Debian GNU/Linux systems :         
154
155    $ /etc/init.d/cupsys restart
156       
157Your users now should be able to print but not exceed their
158printing quota.
159
160WARNING : as of today, 2003-02-06, group quotas are not
161implemented.
162
163SECURITY : You should ensure that only the print quota administrator
164           can run the warnpykota command, but this is actually not
165           enforced in the program. Any user able to launch warnpykota
166           could flood over-quota users' email boxes.
167           
168           You should ensure that only the print quota administrator
169           can run the edpykota command, but this is actually not
170           enforced in the program. Any user could modify his/her
171           or other people's print quota.
172         
173           launching : chmod 750 /usr/bin/warnpykota /usr/bin/edpykota
174           should make you reasonably safe.
175           
176============================================================
177
178Please e-mail bugs to: alet@librelogiciel.com (Jerome Alet)
Note: See TracBrowser for help on using the browser.