root / pykota / trunk / README @ 759

Revision 743, 6.3 kB (checked in by jalet, 22 years ago)

Hope

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