Changeset 1168 for pykota/trunk/docs
- Timestamp:
- 10/14/03 22:26:53 (21 years ago)
- Location:
- pykota/trunk/docs
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/docs/edpykota.sgml
r959 r1168 42 42 <listitem> 43 43 <para> 44 Switch users or groups to <quote>account only</quote> mode (no quota enforcement) ;44 Switch users or groups to or from <quote>account only</quote> mode (no quota enforcement) ; 45 45 </para> 46 46 </listitem> … … 63 63 64 64 $Log$ 65 Revision 1.4 2003/10/14 20:26:53 jalet 66 Better documentation. 67 1.15 is out ! 68 65 69 Revision 1.3 2003/04/24 21:09:47 jalet 66 70 Documentation slightly improved. -
pykota/trunk/docs/filterpykota.sgml
r1101 r1168 32 32 The <application>pstops</application> filter described above is also in charge of doing basic page 33 33 accounting, but <application>PyKota</application> currently doesn't use this facility since it may 34 prove to be unreliable depending on the drivers used or if a paper jam occur for example.34 prove to be unreliable depending on the drivers used or if a paper jam occurs for example. 35 35 </para> 36 36 … … 79 79 previous job's size in the Quota DataBase. It then updates the last user's print quota and account balance, and 80 80 warn him if he is over quota or if his account balance is below 0. Finally it checks if the user who launched the 81 current job is below or above his print quota, and either allow or denythe job's datas to pass to the underlying81 current job is below or above his print quota, and either allows or denies the job's datas to pass to the underlying 82 82 layer (the printer itself). 83 83 </para> … … 96 96 <para> 97 97 If a problem occurs, it is logged either to the filter's standard output or to the system logger, depending on 98 your preferences in <application>PyKota</application>'s configuration file . Also if a print quota is reached98 your preferences in <application>PyKota</application>'s configuration files. Also if a print quota is reached 99 99 you may choose if the administrator, the user, both or no-one will receive an email message explaining 100 100 the situation and proposing a solution. … … 106 106 107 107 $Log$ 108 Revision 1.7 2003/10/14 20:26:53 jalet 109 Better documentation. 110 1.15 is out ! 111 108 112 Revision 1.6 2003/07/25 13:10:58 jalet 109 113 Improved documentation -
pykota/trunk/docs/installation.sgml
r1104 r1168 29 29 have to decompress and visit its archive, to do so just type the following commands : 30 30 <screen> 31 jerome@nordine:~$ tar -zxf pykota-1.1 4_official.tar.gz32 jerome@nordine:~$ cd pykota-1.1 4_official33 jerome@nordine:~/pykota-1.1 4_official$31 jerome@nordine:~$ tar -zxf pykota-1.15_official.tar.gz 32 jerome@nordine:~$ cd pykota-1.15_official 33 jerome@nordine:~/pykota-1.15_official$ 34 34 </screen> 35 35 </para> … … 45 45 You have to compile these files into readable documentation like the <acronym>HTML</acronym> 46 46 or <acronym>PDF</acronym> formats, or buy an official <application>PyKota</application> package 47 which already contains these compiled forms of the documentation. 47 which already contains these compiled forms of the documentation. Of course you already 48 know this because that's what you are currently reading ! 48 49 </para> 49 50 … … 100 101 To do so you either have to launch it with the <option>-i</option> option or 101 102 modify the <filename>/etc/postgresql/postgresql.conf</filename> file, which is 102 self documented and easy to modify too. 103 self documented and easy to modify too. Allowing <acronym>TCP/IP</acronym> connections 104 is not necessary though if your Quota Storage Server and your Print Server are 105 the very same host. 103 106 <tip> 104 107 <title>Tip</title> … … 136 139 The Quota DataBase Administrator is not present in the Quota Database 137 140 itself, he is only defined in <application>PostgreSQL</application> and don't 138 have to exist on any system, nor in the Quota DataBase. His default name s141 have to exist on any system, nor in the Quota DataBase. His default name 139 142 is <literal>pykotaadmin</literal>. 140 143 A Quota Storage read-only user is also created under the name of <literal>pykotauser</literal>. … … 162 165 From a command line interpreter (i.e. shell), type the following commands : 163 166 <screen> 164 jerome@nordine:~$ cd pykota-1.1 4_official/initscripts/postgresql165 jerome@nordine:~/pykota-1.1 4_official/initscripts$ psql -h localhost -U postgres template1167 jerome@nordine:~$ cd pykota-1.15_official/initscripts/postgresql 168 jerome@nordine:~/pykota-1.15_official/initscripts$ psql -h localhost -U postgres template1 166 169 Welcome to psql, the PostgreSQL interactive terminal. 167 170 … … 194 197 ALTER USER 195 198 pykota=# \q 196 jerome@nordine:~/pykota-1.1 4_official/initscripts/postgresql$199 jerome@nordine:~/pykota-1.15_official/initscripts/postgresql$ 197 200 </screen> 198 201 </para> … … 232 235 <para> 233 236 If an error occured, maybe your PostgreSQL version is too old, or 234 an unexpected problem (like a bug) happened. Please send me an email so that I237 an unexpected problem (like a bug) happened. Please contact us via email so that we 235 238 can try to solve the problem. Thanks in advance. 236 239 </para> … … 241 244 242 245 <sect2> 243 <title> LDAP</title>246 <title>OpenLDAP</title> 244 247 245 248 <para> 246 249 From version 1.09 on, <application>OpenLDAP</application> can be used as a Quota Storage Backend. 247 250 It is possible that other LDAP servers can be used, but this is currently untested. 251 </para> 252 253 <para> 254 <application>OpenLDAP</application> is a Lightweight Directory Access Protocol server 255 implementation published as Free Software. 256 You can download it from <ulink url="http://www.openldap.org">http://www.openldap.org</ulink>. 248 257 </para> 249 258 … … 270 279 </screen> 271 280 </para> 281 282 <para> 283 While this is not mandatory, it is recommended that you setup 284 some indexes for some often accessed PyKota attributes. 285 Actually, the <acronym>LDAP</acronym> schema included with 286 PyKota doesn't allow indexes of another type than <literal>eq</literal>, 287 but this will change in a next release. Here are the minimal indexes 288 lines you may want to put in <filename>slapd.conf</filename> : 289 <screen> 290 # Indexes for PyKota 291 index pykotaUserName eq 292 index pykotaGroupName eq 293 index pykotaPrinterName eq 294 index pykotaLastJobIdent eq 295 </screen> 296 </para> 297 272 298 <para> 273 299 Finally, restart the <application>OpenLDAP</application> server : … … 278 304 279 305 <para> 280 Then you have to modify PyKota's configuration files <filename>/etc/pykota/pykota.conf</filename> 306 With an <acronym>LDAP</acronym> backend, PyKota will need some branches 307 in your <acronym>LDAP</acronym> directory to put its own datas. 308 You can configure PyKota to either attach its datas to your existing 309 users and groups, or to put them in their own <literal>ou</literal>. 310 But some <literal>ou</literal>s dedicated to PyKota are needed in any case, 311 so the best bet may be to put all PyKota's datas below an <literal>ou=PyKota</literal> 312 branch. While this will separate these datas from your existing users and groups 313 entries, this may ease the maintainance. 314 </para> 315 316 <para> 317 PyKota needs at least an <literal>ou</literal> for printers, for users quotas, for 318 groups quotas, for print jobs, and for pointers to the last job of each printer. 319 In the future, this last <literal>ou</literal> may disappear as its content 320 will probably be attached to each printer. 321 </para> 322 323 <para> 324 Actually PyKota doesn't create these <literal>ou</literal>s for you, because it's 325 difficult to guess what is the best configuration for you. So you have to 326 create them by yourself, either directly with a text editor and the 327 <application>ldapadd</application> command, or with some specialized tool 328 like <application>gq</application>. 329 </para> 330 331 <para> 332 Once you have chosen and created your directory structure, you have to modify PyKota's configuration files <filename>/etc/pykota/pykota.conf</filename> 281 333 and <filename>/etc/pykota/pykotadmin.conf</filename> 282 to include LDAP specific options. You may want to give a look at 334 to set some LDAP specific options and binding <literal>dn</literal>s. The easiest is 335 probably to give a look at 283 336 <filename>pykota/conf/pykota.conf.sample</filename> to see all the options that are 284 337 needed. Adapt the values to your own configuration, and finally initialize your … … 314 367 For each Print Server on which you plan to implement the print quota 315 368 mechanism, you have, of course, to have an already working printing environment. 316 Currently <application>PyKota</application> works with either the369 Currently <application>PyKota</application> works with either 317 370 <ulink url="http://www.cups.org"><application>CUPS</application></ulink> 318 or the<ulink url="http://lprng.sourceforge.net"><application>LPRng</application></ulink>,319 but more may be added in the future.371 or <ulink url="http://lprng.sourceforge.net"><application>LPRng</application></ulink>, 372 but more printing systems may be added in the future. 320 373 </para> 321 374 … … 356 409 <para> 357 410 The <application>PygreSQL</application> python module. 358 It must match the 359 <application>PostgreSQL</application> client libraries' 360 version, as well as Python's version. 411 It must have been compiled against the same 412 <application>PostgreSQL</application> client libraries. 413 <application>PygreSQL</application> is normally included in 414 <application>PostgreSQL</application>, but you may want to 415 download it from <ulink url="http://www.pygresql.org">http://www.pygresql.org</ulink> 361 416 </para> 362 417 </listitem> … … 366 421 <listitem> 367 422 <para> 368 LDAP backend : TODO 423 OpenLDAP backend : 424 <itemizedlist> 425 <listitem> 426 <para> 427 <application>OpenLDAP</application> client libraries. They must match 428 the <application>OpenLDAP</application> version used on your Quota Storage Server. 429 </para> 430 </listitem> 431 <listitem> 432 <para> 433 The <application>Python-LDAP</application> python module. 434 It must have been compiled against the same 435 <application>OpenLDAP</application> client libraries. 436 You may download this module from <ulink url="http://python-ldap.sourceforge.net">http://python-ldap.sourceforge.net</ulink> 437 </para> 438 </listitem> 439 </itemizedlist> 369 440 </para> 370 441 </listitem> … … 386 457 <application>ucd-snmp</application> or <application>net-snmp</application> tools, version 4.2.5 or above. You only need 387 458 the <application>snmpget</application> command. 388 You can download th emfrom <ulink url="http://www.sourceforge.net/projects/net-snmp/">http://www.sourceforge.net/projects/net-snmp/</ulink>.459 You can download this software from <ulink url="http://www.sourceforge.net/projects/net-snmp/">http://www.sourceforge.net/projects/net-snmp/</ulink>. 389 460 You only need this if you plan to query your printers for their internal page counter via SNMP. 390 461 </para> … … 394 465 <application>netatalk</application> version 1.6.1 or above. You only need 395 466 the <application>pap</application> command. 396 You can download th emfrom <ulink url="http://netatalk.sourceforge.net/">http://netatalk.sourceforge.net/</ulink>.467 You can download this software from <ulink url="http://netatalk.sourceforge.net/">http://netatalk.sourceforge.net/</ulink>. 397 468 You only need this if you plan to query your printers for their internal page counter via AppleTalk. 398 469 </para> … … 406 477 </itemizedlist> 407 478 </para> 479 480 <para> 481 Instead of downloading all these programs' sources and compiling them, which really 482 is a boring task considering that many software are needed, you may prefer to look 483 into the packages included with your GNU/Linux distribution of choice (if you use 484 this operating system of course). Most, if not all, GNU/Linux distributions include 485 all the software mentionned above, in the form of packages which are easier to 486 install than sources tarballs. This is probably the same for the many *BSD 487 distributions. 488 </para> 489 490 <para> 491 Once all these software are installed, installing PyKota itself is a breeze. 492 PyKota being written entirely in the Python language, which is interpreted, 493 there's no need to compile anything. You just have to execute the installation 494 script : 495 <screen> 496 $ python setup.py install 497 </screen> 498 </para> 499 500 <para> 501 The installation script will try to do a safe upgrade if needed. 502 Also it will check if some needed software is missing or unavailable 503 and will tell you so. This may be the case for example if you 504 installed several versions of the Python language, and some Python 505 modules are only available for one of them which is not the one you 506 are actually running. 507 </para> 508 509 <para> 510 On your first installation, the setup script will automatically create 511 the <filename>/etc/pykota</filename> directory and put the sample 512 configuration files <filename>conf/pykota.conf.sample</filename> and 513 <filename>conf/pykotadmin.conf.sample</filename> there, after having 514 renamed them respectively <filename>pykota.conf</filename> and 515 <filename>pykotadmin.conf</filename>. Once copied there, you just 516 have to modify these files to adapt them to your own setup. 517 These files are heavily commented, so you should have no problem. 518 Also their format is quite common, because it's the one used by 519 <application>Samba</application> for example, or by <literal>.ini</literal> 520 files under <application>MS-Windows</application>, so you may already 521 be familiar with this syntax. 522 In a future release, this documentation will include the complete 523 reference for all configuration fields available. Keep in mind that 524 PyKota can be really heavily customized, and can delegate some work 525 to any external command of your choice. 526 </para> 527 528 <para> 529 On later installations, the setup script won't modify any of your 530 configuration files. However it will try to explain what have changed 531 and encourages you to manually do the modifications which are needed. 532 Please create a backup of the <filename>/etc/pykota</filename> 533 directory before modifying anything. 534 Under some circumstances, the setup PyKota may refuse to install PyKota 535 until you have modified your configuration. Just do it and restart 536 the installation script as described above. 537 </para> 538 539 <para> 540 PyKota features some interesting possibilities which allow you to 541 define options either globally so that they apply to all printers, 542 or on a per printer basis. Please see the sample configuration files 543 to see what I mean. In the simplest form, only a global section is 544 needed. In more complex configurations, you will have to create 545 one section per printer. Each section in the configuration files 546 begins with a name between square brackets <literal>[]</literal>. 547 The name to use to define a particular printer section is the name 548 of the print queue on which you want to set quotas. 549 </para> 550 551 <para> 552 After you have modified PyKota's configuration files, you have to 553 double check their permissions, otherwise your installation may be 554 insecure or may not work at all. 555 The main configuration file <filename>/etc/pykota/pykota.conf</filename> 556 doesn't contain much sensitive information, so it can be made 557 readable by anyone. If normal users read this file, at best they 558 will learn the username and optional password of the read-only 559 database user, so they won't be allowed to do any harm. 560 On the other hand, the <filename>/etc/pykota/pykotadmin.conf</filename> 561 file contains the read-write user's identity and password. You must then 562 ensure that no normal user can read this file. It should only be readable 563 by the <literal>root</literal> user, which is always the case, by 564 the user your printing system is running as, and optionally by the print administrators, 565 who are usually members of the <literal>lpadmin</literal> group. Under my Debian GNU/Linux system, 566 with CUPS, here's how to do to give the correct permissions : 567 <screen> 568 $ chown root.root /etc/pykota/pykota.conf 569 $ chmod 644 /etc/pykota/pykota.conf 570 $ chown lp.lpadmin /etc/pykota/pykotadmin.conf 571 $ chmod 640 /etc/pykota/pykotadmin.conf 572 </screen> 573 </para> 574 575 <para> 576 Now depending on your printing system, the configuration to do is particular. 577 We will now see how to plug PyKota into your printing system. 578 </para> 579 580 <sect2> 581 <title>With CUPS</title> 582 583 <para> 584 The easiest way to configure PyKota to be used for a particular <application>CUPS</application> print queue, 585 is to modify the <literal>PPD</literal> file associated with this print queue. 586 Say you want to set quotas on the <literal>HPLaser</literal> print queue. You 587 then just have to modify the file <filename>/etc/cups/ppd/HPLaser.ppd</filename>. 588 You will have to add the following lines somewhere near the beginning of this file : 589 <screen> 590 *% Print Quota System 591 *cupsFilter: "application/vnd.cups-postscript 0 /usr/bin/pykota" 592 </screen> 593 </para> 594 595 <para> 596 The first line is a comment. The second one tells <application>CUPS</application> 597 to launch PyKota's accounting filter just before sending the print job to 598 the printer's hardware. 599 </para> 600 601 <para> 602 You have to restart <application>CUPS</application> for this modification to 603 take effect : 604 <screen> 605 $ /etc/init.d/cupsys restart 606 </screen> 607 </para> 608 609 <para> 610 Repeat the above procedure for each print queue on which you want to use 611 PyKota. That's all ! 612 </para> 613 614 <sect3> 615 <title>Troubleshooting</title> 616 <para> 617 NB : the above procedure only works with <literal>PPD</literal> files which 618 don't already contain an <literal>*cupsFilter</literal> line. PostScript 619 printers usually don't need this line, but other types of printers may need 620 it. A different procedure exists for such printers, but it is not actually 621 documented. Search the mailing list archives at 622 <ulink url="http://cgi.librelogiciel.com/mailman/listinfo/pykota"> 623 http://cgi.librelogiciel.com/mailman/listinfo/pykota 624 </ulink> to learn how to do. 625 </para> 626 627 <para> 628 In case of problem, the simplest way to solve it is currently 629 to ask on PyKota's mailing list, describing the symptoms, as 630 well as the hardware and software you use. 631 In a future release of this document, a section dedicated to 632 Frequently Asked Questions will be included. 633 </para> 634 </sect3> 635 636 </sect2> 637 638 <sect2> 639 <title>With LPRng</title> 640 <para> 641 To plug PyKota into your <application>LPRng</application> setup, 642 you have to modify the <filename>/etc/printcap</filename>. 643 You just have to add the following lines to each queue on 644 which you want to use PyKota : 645 <screen> 646 :achk=true 647 :as=|/usr/bin/pykota 648 </screen> 649 </para> 650 651 <para> 652 You have to restart <application>LPRng</application> for this modification to 653 take effect : 654 <screen> 655 $ /etc/init.d/lprng restart 656 </screen> 657 </para> 658 659 <para> 660 Repeat the above procedure for each print queue on which you want to use 661 PyKota. That's all ! 662 </para> 663 664 <sect3> 665 <title>Troubleshooting</title> 666 <para> 667 In case of problem, the simplest way to solve it is currently 668 to ask on PyKota's mailing list, describing the symptoms, as 669 well as the hardware and software you use. 670 In a future release of this document, a section dedicated to 671 Frequently Asked Questions will be included. 672 </para> 673 </sect3> 674 675 </sect2> 676 408 677 </sect1> 409 678 </chapter> … … 412 681 413 682 $Log$ 683 Revision 1.21 2003/10/14 20:26:53 jalet 684 Better documentation. 685 1.15 is out ! 686 414 687 Revision 1.20 2003/07/25 13:20:32 jalet 415 688 Typo which wasn't