[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> |
---|
| 51 | <application>PyKota</application> is made of the following components : |
---|
| 52 | <itemizedlist> |
---|
| 53 | <listitem> |
---|
| 54 | <para> |
---|
| 55 | Configuration files, which must be placed into the system user |
---|
[2531] | 56 | <literal>pykota</literal>'s home directory as defined in <filename>/etc/passwd</filename> |
---|
| 57 | <footnote> |
---|
| 58 | <para>If your <filename>/etc/passwd</filename> contains something like |
---|
| 59 | <literal>pykota:x:1001:1001:PyKota Admin,,,:/etc/pykota:/bin/sh</literal> |
---|
| 60 | then the home directory is <filename>/etc/pykota/</filename> |
---|
| 61 | </para> |
---|
| 62 | </footnote> : |
---|
[2527] | 63 | <itemizedlist> |
---|
| 64 | <listitem> |
---|
| 65 | <para> |
---|
| 66 | <filename>pykotadmin.conf</filename> : this file contains sensitive database settings |
---|
| 67 | allowing the <application>PyKota</application> software to modify the |
---|
| 68 | print quota database. This file should be protected and should only be |
---|
| 69 | made readable by the administrators of <application>PyKota</application> |
---|
| 70 | and the system user the printing subsystem is running as. |
---|
| 71 | The possibility for a particular user to read this file determines if |
---|
| 72 | this user is a <application>PyKota</application> Administrator or not, |
---|
| 73 | so please give particular attention to this file's permissions. |
---|
| 74 | </para> |
---|
| 75 | </listitem> |
---|
| 76 | <listitem> |
---|
| 77 | <para> |
---|
| 78 | <filename>pykota.conf</filename> : this is the main configuration file for |
---|
| 79 | <application>PyKota</application>. It contains database settings which |
---|
| 80 | allow the <application>PyKota</application> software to access to the print |
---|
| 81 | quota database in readonly mode, as well as global and print queue specific |
---|
| 82 | configuration directives. With a properly configured <application>PyKota</application>, |
---|
| 83 | letting normal users read this file is safe |
---|
| 84 | excepted where you want to forbid users to read other users' print quota |
---|
| 85 | information. However if you're not confident about your database settings, |
---|
| 86 | it's better to not let normal users read this file. This way they can't even |
---|
| 87 | use any of the <application>PyKota</application> command line tools. |
---|
| 88 | </para> |
---|
| 89 | </listitem> |
---|
| 90 | </itemizedlist> |
---|
| 91 | </para> |
---|
| 92 | </listitem> |
---|
| 93 | <listitem> |
---|
| 94 | <para> |
---|
| 95 | Either a <application>PostgreSQL</application> database, or an <acronym>LDAP</acronym> |
---|
| 96 | <footnote><para>Lightweight Directory Access Protocol</para></footnote> |
---|
| 97 | <acronym>DIT</acronym> |
---|
| 98 | <footnote><para>Directory Information Tree</para></footnote> : |
---|
| 99 | <application>PyKota</application> can store its datas into any of these. Support |
---|
| 100 | for other database backends might be added in a future release. |
---|
| 101 | </para> |
---|
| 102 | </listitem> |
---|
| 103 | <listitem> |
---|
| 104 | <para> |
---|
| 105 | A generic <acronym>CUPS</acronym> backend wrapper, named <filename>cupspykota</filename> : |
---|
| 106 | this software captures all print jobs passing through the print queues it manages, |
---|
| 107 | and does the accounting and quota checking. It can reject print jobs in a number |
---|
| 108 | of circumstances like the user being over quota, and interact with the end user through the use of external |
---|
| 109 | commands or shell scripts. This software is written in such a manner than system |
---|
| 110 | administrators can plug their own scripts at the most strategic points of the |
---|
| 111 | printing process, through specific directives that you put in <application>PyKota</application>'s |
---|
| 112 | configuration files. |
---|
| 113 | </para> |
---|
| 114 | </listitem> |
---|
| 115 | <listitem> |
---|
| 116 | <para> |
---|
| 117 | Several command line tools to manage print quotas and accounting. All of these |
---|
| 118 | commands accept the <literal>--version</literal> and <literal>--help</literal> |
---|
| 119 | command line switches, and all have a manual page. Many manual pages are available |
---|
| 120 | in several native languages and contain usage examples. Some commands have many |
---|
| 121 | options and switches, so please read their help carefully. |
---|
| 122 | <itemizedlist> |
---|
| 123 | <listitem> |
---|
| 124 | <para> |
---|
| 125 | <filename>pkturnkey</filename> : to help you do the initial |
---|
| 126 | configuration and database initialization. This command almost transforms <application>PyKota</application> |
---|
| 127 | into a turn-key solution, hence the name. |
---|
| 128 | </para> |
---|
| 129 | </listitem> |
---|
| 130 | <listitem> |
---|
| 131 | <para> |
---|
| 132 | <filename>pkprinters</filename> : to manage printers and printers groups. |
---|
| 133 | </para> |
---|
| 134 | </listitem> |
---|
| 135 | <listitem> |
---|
| 136 | <para> |
---|
| 137 | <filename>edpykota</filename> : to manage users, users groups and quotas. |
---|
| 138 | </para> |
---|
| 139 | </listitem> |
---|
| 140 | <listitem> |
---|
| 141 | <para> |
---|
| 142 | <filename>pkbcodes</filename> : to manage billing codes. |
---|
| 143 | </para> |
---|
| 144 | </listitem> |
---|
| 145 | <listitem> |
---|
| 146 | <para> |
---|
| 147 | <filename>repykota</filename> : to do some basic print quota reporting. |
---|
| 148 | </para> |
---|
| 149 | </listitem> |
---|
| 150 | <listitem> |
---|
| 151 | <para> |
---|
| 152 | <filename>dumpykota</filename> : to dump the database's contents in a portable |
---|
| 153 | way. This command can be used to export <application>PyKota</application>'s |
---|
| 154 | datas to third party software, like print log analyzers or spreadsheets, and |
---|
| 155 | numerous output formats are supported. |
---|
| 156 | </para> |
---|
| 157 | </listitem> |
---|
| 158 | <listitem> |
---|
| 159 | <para> |
---|
[2531] | 160 | <filename>autopykota</filename> : to automate the creation of user print accounts on |
---|
[2527] | 161 | first print. This command is not meant to be used from the command line, but |
---|
| 162 | instead from <filename>pykota.conf</filename>'s <literal>policy</literal> directive. |
---|
| 163 | </para> |
---|
| 164 | </listitem> |
---|
| 165 | <listitem> |
---|
| 166 | <para> |
---|
[2531] | 167 | <filename>pykosd</filename> : to display their remaining credits or |
---|
| 168 | pages to end users. This is an <acronym>OSD</acronym> <footnote><para>On Screen Display</para></footnote> |
---|
| 169 | application which works under the X Window system. |
---|
[2527] | 170 | </para> |
---|
| 171 | </listitem> |
---|
| 172 | <listitem> |
---|
| 173 | <para> |
---|
[2531] | 174 | <filename>pykotme</filename> : to give detailed quotes to end users before they print, this way |
---|
[2527] | 175 | they know in advance how much a print job will cost to them and can decide to route it to |
---|
| 176 | a less costly printer. |
---|
| 177 | </para> |
---|
| 178 | </listitem> |
---|
| 179 | <listitem> |
---|
| 180 | <para> |
---|
| 181 | <filename>pkbanner</filename> : to generate dynamic banner pages when printing. |
---|
| 182 | This command is |
---|
| 183 | not meant to be used from the command line, but |
---|
| 184 | instead from <filename>pykota.conf</filename>'s <literal>startingbanner</literal> |
---|
| 185 | and <literal>endingbanner</literal> directives. If you prefer you can use |
---|
| 186 | your own generator of dynamic banner pages or even static banner pages. |
---|
| 187 | </para> |
---|
| 188 | </listitem> |
---|
| 189 | <listitem> |
---|
| 190 | <para> |
---|
| 191 | <filename>warnpykota</filename> : to warn users over quota from time to time, for example |
---|
| 192 | from <filename>crontab</filename>. Users are warned while printing in any case, so |
---|
| 193 | this command is meant to be used as a periodic reminder. |
---|
| 194 | </para> |
---|
| 195 | </listitem> |
---|
| 196 | <listitem> |
---|
| 197 | <para> |
---|
| 198 | <filename>pkmail</filename> : to let users obtain their print quota situation by email. |
---|
| 199 | In the future other functionnalities will be added. |
---|
| 200 | This command is not meant to be used from the command line, but |
---|
| 201 | instead as a pipe from your mail server's <filename>/etc/aliases</filename> file. |
---|
| 202 | </para> |
---|
| 203 | </listitem> |
---|
| 204 | </itemizedlist> |
---|
| 205 | </para> |
---|
| 206 | </listitem> |
---|
| 207 | <listitem> |
---|
| 208 | <para> |
---|
| 209 | Several <acronym>CGI</acronym> scripts which constitute <application>PyKota</application>'s web interface. |
---|
| 210 | All these scripts behave differently when they are protected with an username and password |
---|
| 211 | compared to when they are not. See <filename>pykota/cgi-bin/README</filename> for |
---|
| 212 | details. |
---|
| 213 | <itemizedlist> |
---|
| 214 | <listitem> |
---|
| 215 | <para> |
---|
| 216 | <filename>printquota.cgi</filename> : to do basic print quota reports like repykota, |
---|
| 217 | and also to examine the printing history, which is not possible with repykota for now. |
---|
| 218 | </para> |
---|
| 219 | </listitem> |
---|
| 220 | <listitem> |
---|
| 221 | <para> |
---|
| 222 | <filename>dumpykota.cgi</filename> : identical to the <filename>dumpykota</filename> |
---|
[2531] | 223 | command line tool, but works from within a web browser. |
---|
[2527] | 224 | </para> |
---|
| 225 | </listitem> |
---|
| 226 | <listitem> |
---|
| 227 | <para> |
---|
| 228 | <filename>pykotme.cgi</filename> : identical to the <filename>pykotme</filename> |
---|
[2531] | 229 | command line tool, but works from within a web browser. |
---|
[2527] | 230 | </para> |
---|
| 231 | </listitem> |
---|
| 232 | </itemizedlist> |
---|
| 233 | </para> |
---|
| 234 | </listitem> |
---|
| 235 | <listitem> |
---|
| 236 | <para> |
---|
[2531] | 237 | Several helper scripts and contributed stuff to handle very specific configurations. |
---|
| 238 | Please visit the subdirectories of the <filename>pykota/</filename> source directory, and |
---|
[2527] | 239 | you may find interesting things... |
---|
| 240 | </para> |
---|
| 241 | </listitem> |
---|
| 242 | </itemizedlist> |
---|
| 243 | </para> |
---|
| 244 | |
---|
[2526] | 245 | </sect1> |
---|
| 246 | |
---|
| 247 | </chapter> |
---|
| 248 | |
---|