1 | # $Id$ |
---|
2 | |
---|
3 | PyKota - Print Quota for CUPS and LPRng |
---|
4 | |
---|
5 | (c) 2003, 2004, 2005 Jerome Alet <alet@librelogiciel.com> |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2 of the License, or |
---|
9 | (at your option) any later version. |
---|
10 | |
---|
11 | This program is distributed in the hope that it will be useful, |
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | GNU General Public License for more details. |
---|
15 | |
---|
16 | You should have received a copy of the GNU General Public License |
---|
17 | along with this program; if not, write to the Free Software |
---|
18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
19 | |
---|
20 | ============================================================ |
---|
21 | |
---|
22 | Documentation : |
---|
23 | --------------- |
---|
24 | |
---|
25 | pykota.schema : |
---|
26 | |
---|
27 | This file can be used to modify an existing LDAP directory |
---|
28 | to add the necessary object classes and attributes for use |
---|
29 | with PyKota. |
---|
30 | |
---|
31 | Include it in your LDAP server's configuration. |
---|
32 | For example, with OpenLDAP 2.1.17 under Debian : |
---|
33 | |
---|
34 | $ cp pykota.schema /etc/ldap/schema |
---|
35 | |
---|
36 | Then edit /etc/ldap/slapd.conf and add a line to |
---|
37 | include the PyKota schema. You should have something |
---|
38 | like : |
---|
39 | |
---|
40 | # Schema and objectClass definitions |
---|
41 | include /etc/ldap/schema/core.schema |
---|
42 | include /etc/ldap/schema/cosine.schema |
---|
43 | include /etc/ldap/schema/nis.schema |
---|
44 | include /etc/ldap/schema/inetorgperson.schema |
---|
45 | include /etc/ldap/schema/pykota.schema |
---|
46 | |
---|
47 | While this is not mandatory, you may want to create |
---|
48 | some indexes to speed things up a bit : |
---|
49 | |
---|
50 | You should already have these : |
---|
51 | |
---|
52 | index objectClass eq |
---|
53 | index cn pres,eq,sub |
---|
54 | index uid pres,eq,sub |
---|
55 | |
---|
56 | But we recommend that you add these : |
---|
57 | |
---|
58 | index pykotaUserName pres,eq,sub |
---|
59 | index pykotaGroupName pres,eq,sub |
---|
60 | index pykotaPrinterName pres,eq,sub |
---|
61 | index pykotaLastJobIdent eq |
---|
62 | |
---|
63 | Now you must ensure that the DN you use to bind to |
---|
64 | your OpenLDAP server don't have search queries size limits, |
---|
65 | which gives for example (OpenLDAP 2.1.x or above) : |
---|
66 | |
---|
67 | limits dn="cn=RWadmin,dc=example,dc=com" size.soft=-1 size.hard=soft |
---|
68 | limits dn="cn=ROadmin,dc=example,dc=com" size.soft=-1 size.hard=soft |
---|
69 | |
---|
70 | Where RWadmin and ROadmin are the usernames used to bind to your |
---|
71 | OpenLDAP server within PyKota, respectively in ReadWrite mode |
---|
72 | (as set in pykotadmin.conf) and in ReadOnly mode (pykota.conf). |
---|
73 | |
---|
74 | Finally, restart the OpenLDAP server : |
---|
75 | |
---|
76 | $ /etc/init.d/slapd restart |
---|
77 | |
---|
78 | pykota-sample.ldif : |
---|
79 | |
---|
80 | You can use this file to initialize an LDAP tree for PyKota, if |
---|
81 | you want. |
---|
82 | |
---|
83 | The structure used in this file is NOT mandatory ! |
---|
84 | Provided you put correct parameters into /etc/pykota/pykota.conf, |
---|
85 | you can structure your LDAP directory the way you want. |
---|
86 | |
---|
87 | To use an LDAP directory as the Quota Storage, just modify |
---|
88 | /etc/pykota/pykota.conf to make it contain lines similar to the LDAP |
---|
89 | related ones in conf/pykota.conf.sample, but adapted to your |
---|
90 | own configuration. Also de-activate the PostgreSQL-related lines. |
---|
91 | |
---|
92 | ============================================================ |
---|