[2526] | 1 | <!-- $Id$ --> |
---|
| 2 | |
---|
| 3 | <chapter> |
---|
| 4 | <title id="introduction">Introduction to PyKota</title> |
---|
| 5 | |
---|
| 6 | <para>Last modified on $Date$</para> |
---|
| 7 | |
---|
| 8 | <para> |
---|
| 9 | This chapter will briefly introduce you to PyKota, and will familiarize |
---|
| 10 | you with this software and its components. |
---|
| 11 | </para> |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | <sect1> |
---|
[2527] | 15 | <title>What is <application>PyKota</application> ?</title> |
---|
[2526] | 16 | |
---|
| 17 | <para> |
---|
[2527] | 18 | <application>PyKota</application> is a print quota and print accounting software solution |
---|
| 19 | for GNU/Linux and compatible print servers. |
---|
[2526] | 20 | </para> |
---|
| 21 | |
---|
[2527] | 22 | <para> |
---|
| 23 | PyKota currently supports the |
---|
| 24 | <ulink url="http://www.cups.org"><application>CUPS</application></ulink> |
---|
| 25 | <footnote><para>Common UNIX Printing System</para></footnote> |
---|
| 26 | printing subsystem, although older releases also supported |
---|
| 27 | <ulink url="http://lprng.sourceforge.net"><application>LPRng</application></ulink>. |
---|
| 28 | </para> |
---|
| 29 | |
---|
| 30 | <para> |
---|
| 31 | PyKota is distributed under the terms of the GNU General Public License of the |
---|
| 32 | <ulink url="http://www.fsf.org">Free Software Foundation</ulink>. This means that |
---|
| 33 | you are allowed to use, modify or redistribute its code provided that you respect |
---|
| 34 | the terms of this license. |
---|
| 35 | </para> |
---|
| 36 | |
---|
| 37 | <para> |
---|
| 38 | We believe that despite being a bit rough around the edges sometimes, <application>PyKota</application> |
---|
| 39 | offers an unmatched flexibility and probably all you want to do with a print quota software is |
---|
| 40 | either already included, easily scriptable with a few lines of shell scripting, or planned |
---|
| 41 | for the next release. |
---|
| 42 | </para> |
---|
| 43 | |
---|
| 44 | <para> |
---|
| 45 | <application>PyKota</application> is however a somewhat complex piece of software, and installing |
---|
| 46 | it will mandate that you also install several dependencies beforehand, as you'll see in the |
---|
| 47 | next chapter. |
---|
| 48 | </para> |
---|
| 49 | |
---|
| 50 | <para> |
---|
[2540] | 51 | Beginning on October 10th 2005, this document won't be <application>PyKota</application>'s reference documentation anymore. |
---|
| 52 | <application>PyKota</application>'s reference documentation is now at : |
---|
| 53 | <ulink url="http://www.librelogiciel.com/software/PyKota/WiKota">http://www.librelogiciel.com/software/PyKota/WiKota</ulink> |
---|
| 54 | </para> |
---|
| 55 | |
---|
| 56 | <para> |
---|
[2527] | 57 | <application>PyKota</application> is made of the following components : |
---|
| 58 | <itemizedlist> |
---|
| 59 | <listitem> |
---|
| 60 | <para> |
---|
| 61 | Configuration files, which must be placed into the system user |
---|
[2531] | 62 | <literal>pykota</literal>'s home directory as defined in <filename>/etc/passwd</filename> |
---|
| 63 | <footnote> |
---|
| 64 | <para>If your <filename>/etc/passwd</filename> contains something like |
---|
| 65 | <literal>pykota:x:1001:1001:PyKota Admin,,,:/etc/pykota:/bin/sh</literal> |
---|
[2532] | 66 | then the home directory is <filename>/etc/pykota</filename> |
---|
[2531] | 67 | </para> |
---|
| 68 | </footnote> : |
---|
[2527] | 69 | <itemizedlist> |
---|
| 70 | <listitem> |
---|
| 71 | <para> |
---|
| 72 | <filename>pykotadmin.conf</filename> : this file contains sensitive database settings |
---|
| 73 | allowing the <application>PyKota</application> software to modify the |
---|
| 74 | print quota database. This file should be protected and should only be |
---|
| 75 | made readable by the administrators of <application>PyKota</application> |
---|
| 76 | and the system user the printing subsystem is running as. |
---|
| 77 | The possibility for a particular user to read this file determines if |
---|
| 78 | this user is a <application>PyKota</application> Administrator or not, |
---|
| 79 | so please give particular attention to this file's permissions. |
---|
| 80 | </para> |
---|
| 81 | </listitem> |
---|
| 82 | <listitem> |
---|
| 83 | <para> |
---|
| 84 | <filename>pykota.conf</filename> : this is the main configuration file for |
---|
| 85 | <application>PyKota</application>. It contains database settings which |
---|
| 86 | allow the <application>PyKota</application> software to access to the print |
---|
| 87 | quota database in readonly mode, as well as global and print queue specific |
---|
| 88 | configuration directives. With a properly configured <application>PyKota</application>, |
---|
| 89 | letting normal users read this file is safe |
---|
| 90 | excepted where you want to forbid users to read other users' print quota |
---|
| 91 | information. However if you're not confident about your database settings, |
---|
| 92 | it's better to not let normal users read this file. This way they can't even |
---|
| 93 | use any of the <application>PyKota</application> command line tools. |
---|
| 94 | </para> |
---|
| 95 | </listitem> |
---|
| 96 | </itemizedlist> |
---|
| 97 | </para> |
---|
| 98 | </listitem> |
---|
| 99 | <listitem> |
---|
| 100 | <para> |
---|
| 101 | Either a <application>PostgreSQL</application> database, or an <acronym>LDAP</acronym> |
---|
| 102 | <footnote><para>Lightweight Directory Access Protocol</para></footnote> |
---|
| 103 | <acronym>DIT</acronym> |
---|
| 104 | <footnote><para>Directory Information Tree</para></footnote> : |
---|
| 105 | <application>PyKota</application> can store its datas into any of these. Support |
---|
| 106 | for other database backends might be added in a future release. |
---|
| 107 | </para> |
---|
| 108 | </listitem> |
---|
| 109 | <listitem> |
---|
| 110 | <para> |
---|
| 111 | A generic <acronym>CUPS</acronym> backend wrapper, named <filename>cupspykota</filename> : |
---|
| 112 | this software captures all print jobs passing through the print queues it manages, |
---|
| 113 | and does the accounting and quota checking. It can reject print jobs in a number |
---|
| 114 | of circumstances like the user being over quota, and interact with the end user through the use of external |
---|
| 115 | commands or shell scripts. This software is written in such a manner than system |
---|
| 116 | administrators can plug their own scripts at the most strategic points of the |
---|
| 117 | printing process, through specific directives that you put in <application>PyKota</application>'s |
---|
| 118 | configuration files. |
---|
| 119 | </para> |
---|
| 120 | </listitem> |
---|
| 121 | <listitem> |
---|
| 122 | <para> |
---|
| 123 | Several command line tools to manage print quotas and accounting. All of these |
---|
| 124 | commands accept the <literal>--version</literal> and <literal>--help</literal> |
---|
| 125 | command line switches, and all have a manual page. Many manual pages are available |
---|
| 126 | in several native languages and contain usage examples. Some commands have many |
---|
| 127 | options and switches, so please read their help carefully. |
---|
| 128 | <itemizedlist> |
---|
| 129 | <listitem> |
---|
| 130 | <para> |
---|
| 131 | <filename>pkturnkey</filename> : to help you do the initial |
---|
| 132 | configuration and database initialization. This command almost transforms <application>PyKota</application> |
---|
| 133 | into a turn-key solution, hence the name. |
---|
| 134 | </para> |
---|
| 135 | </listitem> |
---|
| 136 | <listitem> |
---|
| 137 | <para> |
---|
| 138 | <filename>pkprinters</filename> : to manage printers and printers groups. |
---|
| 139 | </para> |
---|
| 140 | </listitem> |
---|
| 141 | <listitem> |
---|
| 142 | <para> |
---|
| 143 | <filename>edpykota</filename> : to manage users, users groups and quotas. |
---|
| 144 | </para> |
---|
| 145 | </listitem> |
---|
| 146 | <listitem> |
---|
| 147 | <para> |
---|
| 148 | <filename>pkbcodes</filename> : to manage billing codes. |
---|
| 149 | </para> |
---|
| 150 | </listitem> |
---|
| 151 | <listitem> |
---|
| 152 | <para> |
---|
| 153 | <filename>repykota</filename> : to do some basic print quota reporting. |
---|
| 154 | </para> |
---|
| 155 | </listitem> |
---|
| 156 | <listitem> |
---|
| 157 | <para> |
---|
| 158 | <filename>dumpykota</filename> : to dump the database's contents in a portable |
---|
| 159 | way. This command can be used to export <application>PyKota</application>'s |
---|
| 160 | datas to third party software, like print log analyzers or spreadsheets, and |
---|
| 161 | numerous output formats are supported. |
---|
| 162 | </para> |
---|
| 163 | </listitem> |
---|
| 164 | <listitem> |
---|
| 165 | <para> |
---|
[2531] | 166 | <filename>autopykota</filename> : to automate the creation of user print accounts on |
---|
[2527] | 167 | first print. This command is not meant to be used from the command line, but |
---|
| 168 | instead from <filename>pykota.conf</filename>'s <literal>policy</literal> directive. |
---|
| 169 | </para> |
---|
| 170 | </listitem> |
---|
| 171 | <listitem> |
---|
| 172 | <para> |
---|
[2531] | 173 | <filename>pykosd</filename> : to display their remaining credits or |
---|
| 174 | pages to end users. This is an <acronym>OSD</acronym> <footnote><para>On Screen Display</para></footnote> |
---|
| 175 | application which works under the X Window system. |
---|
[2527] | 176 | </para> |
---|
| 177 | </listitem> |
---|
| 178 | <listitem> |
---|
| 179 | <para> |
---|
[2531] | 180 | <filename>pykotme</filename> : to give detailed quotes to end users before they print, this way |
---|
[2527] | 181 | they know in advance how much a print job will cost to them and can decide to route it to |
---|
| 182 | a less costly printer. |
---|
| 183 | </para> |
---|
| 184 | </listitem> |
---|
| 185 | <listitem> |
---|
| 186 | <para> |
---|
| 187 | <filename>pkbanner</filename> : to generate dynamic banner pages when printing. |
---|
| 188 | This command is |
---|
| 189 | not meant to be used from the command line, but |
---|
| 190 | instead from <filename>pykota.conf</filename>'s <literal>startingbanner</literal> |
---|
| 191 | and <literal>endingbanner</literal> directives. If you prefer you can use |
---|
| 192 | your own generator of dynamic banner pages or even static banner pages. |
---|
| 193 | </para> |
---|
| 194 | </listitem> |
---|
| 195 | <listitem> |
---|
| 196 | <para> |
---|
| 197 | <filename>warnpykota</filename> : to warn users over quota from time to time, for example |
---|
| 198 | from <filename>crontab</filename>. Users are warned while printing in any case, so |
---|
| 199 | this command is meant to be used as a periodic reminder. |
---|
| 200 | </para> |
---|
| 201 | </listitem> |
---|
| 202 | <listitem> |
---|
| 203 | <para> |
---|
| 204 | <filename>pkmail</filename> : to let users obtain their print quota situation by email. |
---|
| 205 | In the future other functionnalities will be added. |
---|
| 206 | This command is not meant to be used from the command line, but |
---|
| 207 | instead as a pipe from your mail server's <filename>/etc/aliases</filename> file. |
---|
| 208 | </para> |
---|
| 209 | </listitem> |
---|
| 210 | </itemizedlist> |
---|
| 211 | </para> |
---|
| 212 | </listitem> |
---|
| 213 | <listitem> |
---|
| 214 | <para> |
---|
| 215 | Several <acronym>CGI</acronym> scripts which constitute <application>PyKota</application>'s web interface. |
---|
| 216 | All these scripts behave differently when they are protected with an username and password |
---|
| 217 | compared to when they are not. See <filename>pykota/cgi-bin/README</filename> for |
---|
| 218 | details. |
---|
| 219 | <itemizedlist> |
---|
| 220 | <listitem> |
---|
| 221 | <para> |
---|
| 222 | <filename>printquota.cgi</filename> : to do basic print quota reports like repykota, |
---|
| 223 | and also to examine the printing history, which is not possible with repykota for now. |
---|
| 224 | </para> |
---|
| 225 | </listitem> |
---|
| 226 | <listitem> |
---|
| 227 | <para> |
---|
| 228 | <filename>dumpykota.cgi</filename> : identical to the <filename>dumpykota</filename> |
---|
[2531] | 229 | command line tool, but works from within a web browser. |
---|
[2527] | 230 | </para> |
---|
| 231 | </listitem> |
---|
| 232 | <listitem> |
---|
| 233 | <para> |
---|
| 234 | <filename>pykotme.cgi</filename> : identical to the <filename>pykotme</filename> |
---|
[2531] | 235 | command line tool, but works from within a web browser. |
---|
[2527] | 236 | </para> |
---|
| 237 | </listitem> |
---|
| 238 | </itemizedlist> |
---|
| 239 | </para> |
---|
| 240 | </listitem> |
---|
| 241 | <listitem> |
---|
| 242 | <para> |
---|
[2531] | 243 | Several helper scripts and contributed stuff to handle very specific configurations. |
---|
| 244 | Please visit the subdirectories of the <filename>pykota/</filename> source directory, and |
---|
[2527] | 245 | you may find interesting things... |
---|
| 246 | </para> |
---|
| 247 | </listitem> |
---|
| 248 | </itemizedlist> |
---|
| 249 | </para> |
---|
| 250 | |
---|
[2526] | 251 | </sect1> |
---|
| 252 | |
---|
| 253 | </chapter> |
---|
| 254 | |
---|