~ubuntu-branches/ubuntu/utopic/phpldapadmin/utopic

« back to all changes in this revision

Viewing changes to config/config.php.example

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Lesicnik
  • Date: 2010-05-10 06:15:32 UTC
  • mfrom: (1.1.9 upstream) (3.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100510061532-s4m6ytom0eb7oam1
Tags: 1.2.0.5-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Merged call to dh_install to install debian/additional-templates/*
  - added groupOfNames.xml
  - Adds php_value memory_limit 32M to the apache.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
/**
8
8
 * The phpLDAPadmin config file
 
9
 * See: http://phpldapadmin.sourceforge.net/wiki/index.php/Config.php
9
10
 *
10
11
 * This is where you can customise some of the phpLDAPadmin defaults
11
12
 * that are defined in config_default.php.
13
14
 * To override a default, use the $config->custom variable to do so.
14
15
 * For example, the default for defining the language in config_default.php
15
16
 *
16
 
 * $this->default->appearance['lang'] = array(
 
17
 * $this->default->appearance['language'] = array(
17
18
 *  'desc'=>'Language',
18
19
 *  'default'=>'auto');
19
20
 *
20
 
 * to override this, use $config->custom->appearance['lang'] = 'en';
 
21
 * to override this, use $config->custom->appearance['language'] = 'en_EN';
21
22
 *
22
23
 * This file is also used to configure your LDAP server connections.
23
24
 *
39
40
/* Useful important configuration overrides  */
40
41
/*********************************************/
41
42
 
42
 
/* If you are asked to put pla in debug mode, this is how you do it: */
 
43
/* If you are asked to put PLA in debug mode, this is how you do it: */
43
44
#  $config->custom->debug['level'] = 255;
44
45
#  $config->custom->debug['syslog'] = true;
45
46
#  $config->custom->debug['file'] = '/tmp/pla_debug.log';
57
58
 
58
59
/* The temporary storage directory where we will put jpegPhoto data
59
60
   This directory must be readable and writable by your web server. */
60
 
// $config->custom->jpeg['tmpdir'] = "/tmp";     // Example for Unix systems
61
 
#  $config->custom->jpeg['tmpdir'] = "c:\\temp"; // Example for Windows systems
 
61
// $config->custom->jpeg['tmpdir'] = '/tmp';     // Example for Unix systems
 
62
#  $config->custom->jpeg['tmpdir'] = 'c:\\temp'; // Example for Windows systems
62
63
 
63
64
/* Set this to (bool)true if you do NOT want a random salt used when
64
65
   calling crypt().  Instead, use the first two letters of the user's
72
73
   30 seconds or the setting of max_exection_time if this is null. */
73
74
// $config->custom->session['timelimit'] = 30;
74
75
 
 
76
/* Our local timezone
 
77
   This is to make sure that when we ask the system for the current time, we
 
78
   get the right local time. If this is not set, all time() calculations will
 
79
   assume UTC if you have not set PHP date.timezone. */
 
80
// $config->custom->appearance['timezone'] = null;
 
81
#  $config->custom->appearance['timezone'] = 'Australia/Melbourne';
 
82
 
75
83
/*********************************************/
76
84
/* Commands                                  */
77
85
/*********************************************/
79
87
/* Command availability ; if you don't authorize a command the command
80
88
   links will not be shown and the command action will not be permitted.
81
89
   For better security, set also ACL in your ldap directory. */
82
 
 
83
90
/*
84
 
$config->custom->commands['all'] = array(
85
 
 'home'    => true,
86
 
 'external_links' => array('feature'  => true,
87
 
                           'bug'      => true,
88
 
                           'donation' => true,
89
 
                           'help'     => true,
90
 
                           'credits'  => true),
91
 
 'purge'   => true,
92
 
 'schema'  => true,
93
 
 'import'  => true,
94
 
 'export'  => true,
95
 
 'logout'  => true,
96
 
 'search'  => array('simple_search'     => true,
97
 
                    'predefined_search' => true,
98
 
                    'advanced_search'   => true),
99
 
 'server_refresh' => true,
100
 
 'server_info'    => true,
101
 
 'entry_refresh'  => true,
102
 
 'entry_move'     => true,
103
 
 'entry_internal_attributes_show' => true,
104
 
 'entry_delete'  => array('simple_delete' => true,
105
 
                          'mass_delete'   => false),
106
 
 'entry_rename'  => true,
107
 
 'entry_compare' => true,
108
 
 'entry_create'  => true,
109
 
 'attribute_add'          => true,
110
 
 'attribute_add_value'    => true,
111
 
 'attribute_delete'       => true,
112
 
 'attribute_delete_value' => true);
 
91
$config->custom->commands['cmd'] = array(
 
92
        'entry_internal_attributes_show' => true,
 
93
        'entry_refresh' => true,
 
94
        'oslinks' => true,
 
95
        'switch_template' => true
 
96
);
 
97
 
 
98
$config->custom->commands['script'] = array(
 
99
        'add_attr_form' => true,
 
100
        'add_oclass_form' => true,
 
101
        'add_value_form' => true,
 
102
        'collapse' => true,
 
103
        'compare' => true,
 
104
        'compare_form' => true,
 
105
        'copy' => true,
 
106
        'copy_form' => true,
 
107
        'create' => true,
 
108
        'create_confirm' => true,
 
109
        'delete' => true,
 
110
        'delete_attr' => true,
 
111
        'delete_form' => true,
 
112
        'draw_tree_node' => true,
 
113
        'expand' => true,
 
114
        'export' => true,
 
115
        'export_form' => true,
 
116
        'import' => true,
 
117
        'import_form' => true,
 
118
        'login' => true,
 
119
        'logout' => true,
 
120
        'login_form' => true,
 
121
        'mass_delete' => true,
 
122
        'mass_edit' => true,
 
123
        'mass_update' => true,
 
124
        'modify_member_form' => true,
 
125
        'monitor' => true,
 
126
        'purge_cache' => true,
 
127
        'query_engine' => true,
 
128
        'rename' => true,
 
129
        'rename_form' => true,
 
130
        'rdelete' => true,
 
131
        'refresh' => true,
 
132
        'schema' => true,
 
133
        'server_info' => true,
 
134
        'show_cache' => true,
 
135
        'template_engine' => true,
 
136
        'update_confirm' => true,
 
137
        'update' => true
 
138
);
113
139
*/
114
140
 
115
141
/*********************************************/
118
144
 
119
145
/* If you want to choose the appearance of the tree, specify a class name which
120
146
   inherits from the Tree class. */
121
 
// $config->custom->appearance['tree'] = "AJAXTree";
122
 
#  $config->custom->appearance['tree'] = "HTMLTree";
123
 
 
124
 
/* If you want to customise the entry view/edition, specify your factory name which
125
 
   inherits from the EntryFactory class.
126
 
   The 'DefaultEntryFactory' draws all the attributes of an entry according this
127
 
   config file and the ldap schema definition ; the 'TemplateEntryFactory' draws
128
 
   an entry according to the template whose regexp matches with the dn. */
129
 
#  $config->custom->appearance['entry_factory'] = "DefaultEntryFactory";
130
 
// $config->custom->appearance['entry_factory'] = "TemplateEntryFactory";
131
 
 
132
 
/* If you want to customise an attribute view/edition, specify your factory name which
133
 
   inherits from the AttributeFactory class.
134
 
   An AttributeFactory defines which class to use to represent a given attribute */
135
 
// $config->custom->appearance['attribute_factory'] = "AttributeFactory";
 
147
// $config->custom->appearance['tree'] = 'AJAXTree';
 
148
#  $config->custom->appearance['tree'] = 'HTMLTree';
136
149
 
137
150
/* Just show your custom templates. */
138
151
// $config->custom->appearance['custom_templates_only'] = false;
140
153
/* Disable the default template. */
141
154
// $config->custom->appearance['disable_default_template'] = false;
142
155
 
 
156
/* Hide the warnings for invalid objectClasses/attributes in templates. */
 
157
// $config->custom->appearance['hide_template_warning'] = false;
 
158
 
143
159
/* Configure what objects are shown in left hand tree */
144
160
// $config->custom->appearance['tree_filter'] = '(objectclass=*)';
145
161
 
151
167
#  $config->custom->appearance['tree_width'] = 250;
152
168
 
153
169
/*********************************************/
 
170
/* User-friendly attribute translation       */
 
171
/*********************************************/
 
172
 
 
173
/* Use this array to map attribute names to user friendly names. For example, if
 
174
   you don't want to see "facsimileTelephoneNumber" but rather "Fax". */
 
175
// $config->custom->appearance['friendly_attrs'] = array();
 
176
$config->custom->appearance['friendly_attrs'] = array(
 
177
        'facsimileTelephoneNumber' => 'Fax',
 
178
        'gid'                      => 'Group',
 
179
        'mail'                     => 'Email',
 
180
        'telephoneNumber'          => 'Telephone',
 
181
        'uid'                      => 'User Name',
 
182
        'userPassword'             => 'Password'
 
183
);
 
184
 
 
185
/*********************************************/
 
186
/* Hidden attributes                         */
 
187
/*********************************************/
 
188
 
 
189
/* You may want to hide certain attributes from being edited. If you want to
 
190
   hide attributes from the user, you should use your LDAP servers ACLs.
 
191
   NOTE: The user must be able to read the hide_attrs_exempt entry to be
 
192
   excluded. */
 
193
// $config->custom->appearance['hide_attrs'] = array();
 
194
#  $config->custom->appearance['hide_attrs'] = array('objectClass');
 
195
 
 
196
/* Members of this list will be exempt from the hidden attributes.*/
 
197
// $config->custom->appearance['hide_attrs_exempt'] = null;
 
198
#  $config->custom->appearance['hide_attrs_exempt'] = 'cn=PLA UnHide,ou=Groups,c=AU';
 
199
 
 
200
/*********************************************/
 
201
/* Read-only attributes                      */
 
202
/*********************************************/
 
203
 
 
204
/* You may want to phpLDAPadmin to display certain attributes as read only,
 
205
   meaning that users will not be presented a form for modifying those
 
206
   attributes, and they will not be allowed to be modified on the "back-end"
 
207
   either. You may configure this list here:
 
208
   NOTE: The user must be able to read the readonly_attrs_exempt entry to be
 
209
   excluded. */
 
210
// $config->custom->appearance['readonly_attrs'] = array();
 
211
 
 
212
/* Members of this list will be exempt from the readonly attributes.*/
 
213
// $config->custom->appearance['readonly_attrs_exempt'] = null;
 
214
#  $config->custom->appearance['readonly_attrs_exempt'] = 'cn=PLA ReadWrite,ou=Groups,c=AU';
 
215
 
 
216
/*********************************************/
 
217
/* Group attributes                          */
 
218
/*********************************************/
 
219
 
 
220
/* Add "modify group members" link to the attribute. */
 
221
// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid');
 
222
 
 
223
/* Configure filter for member search. This only applies to "modify group members" feature */
 
224
// $config->custom->modify_member['filter'] = '(objectclass=Person)';
 
225
 
 
226
/* Attribute that is added to the group member attribute. */
 
227
// $config->custom->modify_member['attr'] = 'dn';
 
228
 
 
229
/* For Posix attributes */
 
230
// $config->custom->modify_member['posixattr'] = 'uid';
 
231
// $config->custom->modify_member['posixfilter'] = '(uid=*)';
 
232
// $config->custom->modify_member['posixgroupattr'] = 'memberUid';
 
233
 
 
234
/*********************************************/
 
235
/* Support for attrs display order           */
 
236
/*********************************************/
 
237
 
 
238
/* Use this array if you want to have your attributes displayed in a specific
 
239
   order. You can use default attribute names or their fridenly names.
 
240
   For example, "sn" will be displayed right after "givenName". All the other
 
241
   attributes that are not specified in this array will be displayed after in
 
242
   alphabetical order. */
 
243
// $config->custom->appearance['attr_display_order'] = array();
 
244
#  $config->custom->appearance['attr_display_order'] = array(
 
245
#   'givenName',
 
246
#   'sn',
 
247
#   'cn',
 
248
#   'displayName',
 
249
#   'uid',
 
250
#   'uidNumber',
 
251
#   'gidNumber',
 
252
#   'homeDirectory',
 
253
#   'mail',
 
254
#   'userPassword'
 
255
#  );
 
256
 
 
257
/*********************************************/
154
258
/* Define your LDAP servers in this section  */
155
259
/*********************************************/
156
260
 
157
 
$i=0;
158
 
$ldapservers = new LDAPServers;
 
261
$servers = new Datastore();
 
262
 
 
263
/* $servers->NewServer('ldap_pla') must be called before each new LDAP server
 
264
   declaration. */
 
265
$servers->newServer('ldap_pla');
159
266
 
160
267
/* A convenient name that will appear in the tree viewer and throughout
161
268
   phpLDAPadmin to identify this LDAP server to users. */
162
 
$ldapservers->SetValue($i,'server','name','My LDAP Server');
 
269
$servers->setValue('server','name','My LDAP Server');
163
270
 
164
271
/* Examples:
165
272
   'ldap.example.com',
166
273
   'ldaps://ldap.example.com/',
167
274
   'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
168
275
           (Unix socket at /usr/local/var/run/ldap) */
169
 
// $ldapservers->SetValue($i,'server','host','127.0.0.1');
 
276
// $servers->setValue('server','host','127.0.0.1');
170
277
 
171
278
/* The port your LDAP server listens on (no quotes). 389 is standard. */
172
 
// $ldapservers->SetValue($i,'server','port',389);
 
279
// $servers->setValue('server','port',389);
173
280
 
174
281
/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
175
282
   auto-detect it for you. */
176
 
// $ldapservers->SetValue($i,'server','base',array(''));
 
283
// $servers->setValue('server','base',array(''));
177
284
 
178
285
/* Four options for auth_type:
179
286
   1. 'cookie': you will login via a web form, and a client-side cookie will
189
296
   your situation. If you choose 'cookie', your cookie contents will be
190
297
   encrypted using blowfish and the secret your specify above as
191
298
   session['blowfish']. */
192
 
// $ldapservers->SetValue($i,'server','auth_type','cookie');
 
299
// $servers->setValue('login','auth_type','session');
193
300
 
194
301
/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
195
302
   'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If
196
303
   you specify a login_attr in conjunction with a cookie or session auth_type,
197
 
   then you can also specify the login_dn/login_pass here for searching the
 
304
   then you can also specify the bind_id/bind_pass here for searching the
198
305
   directory for users (ie, if your LDAP server does not allow anonymous binds. */
199
 
// $ldapservers->SetValue($i,'login','dn','');
200
 
#  $ldapservers->SetValue($i,'login','dn','cn=Manager,dc=example,dc=com');
 
306
// $servers->setValue('login','bind_id','');
 
307
#  $servers->setValue('login','bind_id','cn=Manager,dc=example,dc=com');
201
308
 
202
 
/* Your LDAP password. If you specified an empty login_dn above, this MUST also
 
309
/* Your LDAP password. If you specified an empty bind_id above, this MUST also
203
310
   be blank. */
204
 
// $ldapservers->SetValue($i,'login','pass','');
205
 
#  $ldapservers->SetValue($i,'login','pass','secret');
 
311
// $servers->setValue('login','bind_pass','');
 
312
#  $servers->setValue('login','bind_pass','secret');
206
313
 
207
314
/* Use TLS (Transport Layer Security) to connect to the LDAP server. */
208
 
// $ldapservers->SetValue($i,'server','tls',false);
 
315
// $servers->setValue('server','tls',false);
209
316
 
210
317
/************************************
211
318
 *      SASL Authentication         *
214
321
/* Enable SASL authentication LDAP SASL authentication requires PHP 5.x
215
322
   configured with --with-ldap-sasl=DIR. If this option is disabled (ie, set to
216
323
   false), then all other sasl options are ignored. */
217
 
// $ldapservers->SetValue($i,'server','sasl_auth',false);
 
324
// $servers->setValue('server','sasl_auth',false);
218
325
 
219
326
/* SASL auth mechanism */
220
 
// $ldapservers->SetValue($i,'server','sasl_mech','PLAIN');
 
327
// $servers->setValue('server','sasl_mech','PLAIN');
221
328
 
222
329
/* SASL authentication realm name */
223
 
// $ldapservers->SetValue($i,'server','sasl_realm','');
224
 
#  $ldapservers->SetValue($i,'server','sasl_realm',"example.com");
 
330
// $servers->setValue('server','sasl_realm','');
 
331
#  $servers->setValue('server','sasl_realm','example.com');
225
332
 
226
333
/* SASL authorization ID name
227
334
   If this option is undefined, authorization id will be computed from bind DN,
228
335
   using sasl_authz_id_regex and sasl_authz_id_replacement. */
229
 
// $ldapservers->SetValue($i,'server','sasl_authz_id', null);
 
336
// $servers->setValue('server','sasl_authz_id', null);
230
337
 
231
338
/* SASL authorization id regex and replacement
232
339
   When sasl_authz_id property is not set (default), phpLDAPAdmin will try to
241
348
   For info about pcre regexes, see:
242
349
   - pcre(3), perlre(3)
243
350
   - http://www.php.net/preg_replace */
244
 
// $ldapservers->SetValue($i,'server','sasl_authz_id_regex',null);
245
 
// $ldapservers->SetValue($i,'server','sasl_authz_id_replacement',null);
246
 
#  $ldapservers->SetValue($i,'server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
247
 
#  $ldapservers->SetValue($i,'server','sasl_authz_id_replacement','$1');
 
351
// $servers->setValue('server','sasl_authz_id_regex',null);
 
352
// $servers->setValue('server','sasl_authz_id_replacement',null);
 
353
#  $servers->setValue('server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
 
354
#  $servers->setValue('server','sasl_authz_id_replacement','$1');
248
355
 
249
356
/* SASL auth security props.
250
 
   See http://beepcore-tcl.sourceforge.net/tclsasl.html#anchor5 for explanation.
251
 
*/
252
 
// $ldapservers->SetValue($i,'server','sasl_props',null);
253
 
 
254
 
/* If the link between your web server and this LDAP server is slow, it is
255
 
   recommended that you set 'low_bandwidth' to true. This will enable
256
 
   phpLDAPadmin to forego some "fancy" features to conserve bandwidth. */
257
 
// $ldapservers->SetValue($i,'server','low_bandwidth',false);
 
357
   See http://beepcore-tcl.sourceforge.net/tclsasl.html#anchor5 for explanation. */
 
358
// $servers->setValue('server','sasl_props',null);
258
359
 
259
360
/* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5,
260
361
   blowfish, crypt or leave blank for now default algorithm. */
261
 
// $ldapservers->SetValue($i,'appearance','password_hash','md5');
 
362
// $servers->setValue('appearance','password_hash','md5');
262
363
 
263
364
/* If you specified 'cookie' or 'session' as the auth_type above, you can
264
365
   optionally specify here an attribute to use when logging in. If you enter
266
367
   and log in as that user.
267
368
   Leave blank or specify 'dn' to use full DN for logging in. Note also that if
268
369
   your LDAP server requires you to login to perform searches, you can enter the
269
 
   DN to use when searching in 'login_dn' and 'login_pass' above. You may also
270
 
   specify 'string', in which case you can provide a string to use for logging
271
 
   users in. See 'login_string' directly below. */
272
 
// $ldapservers->SetValue($i,'login','attr','dn');
 
370
   DN to use when searching in 'bind_id' and 'bind_pass' above.
 
371
// $servers->setValue('login','attr','dn');
 
372
 
 
373
/* Base DNs to used for logins. If this value is not set, then the LDAP server
 
374
   Base DNs are used. */
 
375
// $servers->setValue('login','base',array());
 
376
 
 
377
/* If 'login,attr' is used above such that phpLDAPadmin will search for your DN
 
378
   at login, you may restrict the search to a specific objectClasses. EG, set this
 
379
   to array('posixAccount') or array('inetOrgPerson',..), depending upon your
 
380
   setup. */
 
381
// $servers->setValue('login','class',array());
273
382
 
274
383
/* If you specified something different from 'dn', for example 'uid', as the
275
384
   login_attr above, you can optionally specify here to fall back to
278
387
   the ldap administrator wants to log in with his root-dn, that does not
279
388
   necessarily have the uid attribute.
280
389
   When using this feature, login_class is ignored. */
281
 
// $ldapservers->SetValue($i,'login','fallback_dn',false);
282
 
 
283
 
/* If you specified 'cookie' or 'session' as the auth_type above, and you
284
 
   specified 'string' for 'login_attr' above, you must provide a string here for
285
 
   logging users in. If, for example, I have a lot of user entries with DNs like
286
 
   "uid=dsmith,ou=People,dc=example,dc=com", then I can specify a string
287
 
   "uid=<username>,ou=People,dc=example,dc=com" and my users can login with
288
 
   their user names alone, ie: "dsmith" in this case. */
289
 
#  $ldapservers->SetValue($i,'login','string','uid=<username>,ou=People,dc=example,dc=com');
290
 
 
291
 
/* If 'login_attr' is used above such that phpLDAPadmin will search for your DN
292
 
   at login, you may restrict the search to a specific objectClass. EG, set this
293
 
   to 'posixAccount' or 'inetOrgPerson', depending upon your setup. */
294
 
// $ldapservers->SetValue($i,'login','class',null);
 
390
// $servers->setValue('login','fallback_dn',false);
295
391
 
296
392
/* Specify true If you want phpLDAPadmin to not display or permit any
297
393
   modification to the LDAP server. */
298
 
// $ldapservers->SetValue($i,'server','read_only',false);
 
394
// $servers->setValue('server','read_only',false);
299
395
 
300
396
/* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links
301
397
   in the tree viewer. */
302
 
// $ldapservers->SetValue($i,'appearance','show_create',true);
 
398
// $servers->setValue('appearance','show_create',true);
303
399
 
304
400
/* This feature allows phpLDAPadmin to automatically determine the next
305
401
   available uidNumber for a new entry. */
306
 
// $ldapservers->SetValue($i,'auto_number','enable',true);
 
402
// $servers->setValue('auto_number','enable',true);
307
403
 
308
404
/* The mechanism to use when finding the next available uidNumber. Two possible
309
405
   values: 'uidpool' or 'search'.
311
407
   blindly lookup the next available uidNumber. The 'search' mechanism searches
312
408
   for entries with a uidNumber value and finds the first available uidNumber
313
409
   (slower). */
314
 
// $ldapservers->SetValue($i,'auto_number','mechanism','search');
 
410
// $servers->setValue('auto_number','mechanism','search');
315
411
 
316
412
/* The DN of the search base when the 'search' mechanism is used above. */
317
 
#  $ldapservers->SetValue($i,'auto_number','search_base','ou=People,dc=example,dc=com');
318
 
 
319
 
/* The minimum number to use when searching for the next available UID number
320
 
   (only when 'search' is used for auto_uid_number_mechanism' */
321
 
// $ldapservers->SetValue($i,'auto_number','min',1000);
322
 
 
323
 
/* The DN of the uidPool entry when 'uidpool' mechanism is used above. */
324
 
// $ldapservers->SetValue($i,'auto_number','uidpool_dn','cn=uidPool,dc=example,dc=com');
 
413
#  $servers->setValue('auto_number','search_base','ou=People,dc=example,dc=com');
 
414
 
 
415
/* The minimum number to use when searching for the next available number
 
416
   (only when 'search' is used for auto_number */
 
417
// $servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500));
325
418
 
326
419
/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
327
420
   searching for the uidnumber. The idea is, this user id would have full
328
421
   (readonly) access to uidnumber in your ldap directory (the logged in user
329
422
   may not), so that you can be guaranteed to get a unique uidnumber for your
330
423
   directory. */
331
 
// $ldapservers->SetValue($i,'auto_number','dn',null);
 
424
// $servers->setValue('auto_number','dn',null);
332
425
 
333
426
/* The password for the dn above. */
334
 
// $ldapservers->SetValue($i,'auto_number','pass',null);
 
427
// $servers->setValue('auto_number','pass',null);
335
428
 
336
429
/* Enable anonymous bind login. */
337
 
// $ldapservers->SetValue($i,'login','anon_bind',true);
 
430
// $servers->setValue('login','anon_bind',true);
338
431
 
339
432
/* Use customized page with prefix when available. */
340
 
#  $ldapservers->SetValue($i,'custom','pages_prefix','custom_');
341
 
 
342
 
/* If you set this, then phpldapadmin will bind to LDAP with this user when
343
 
   testing for unique attributes (as set in unique_attrs array). If you want to
344
 
   enforce unique attributes, than this id should have full (readonly) access
345
 
   to the attributes in question (the logged in user may not have enough access)
346
 
*/
347
 
// $ldapservers->SetValue($i,'unique_attrs','dn',null);
348
 
 
349
 
/* The password for the dn above */
350
 
// $ldapservers->SetValue($i,'unique_attrs','pass',null);
 
433
#  $servers->setValue('custom','pages_prefix','custom_');
351
434
 
352
435
/* If you set this, then only these DNs are allowed to log in. This array can
353
436
   contain individual users, groups or ldap search filter(s). Keep in mind that
354
437
   the user has not authenticated yet, so this will be an anonymous search to
355
438
   the LDAP server, so make your ACLs allow these searches to return results! */
356
 
#  $ldapservers->SetValue($i,'login','allowed_dns',array(
 
439
#  $servers->setValue('login','allowed_dns',array(
357
440
#   'uid=stran,ou=People,dc=example,dc=com',
358
441
#   '(&(gidNumber=811)(objectClass=groupOfNames))',
359
442
#   '(|(uidNumber=200)(uidNumber=201))',
360
443
#   'cn=callcenter,ou=Group,dc=example,dc=com'));
361
444
 
362
445
/* Set this if you dont want this LDAP server to show in the tree */
363
 
// $ldapservers->SetValue($i,'appearance','visible',true);
 
446
// $servers->setValue('server','visible',true);
364
447
 
365
448
/* This is the time out value in minutes for the server. After as many minutes
366
449
   of inactivity you will be automatically logged out. If not set, the default
367
450
   value will be ( session_cache_expire()-1 ) */
368
 
#  $ldapservers->SetValue($i,'login','timeout',30);
 
451
#  $servers->setValue('login','timeout',30);
369
452
 
370
453
/* Set this if you want phpldapadmin to perform rename operation on entry which
371
454
   has children. Certain servers are known to allow it, certain are not */
372
 
// $ldapservers->SetValue($i,'server','branch_rename',false);
 
455
// $servers->setValue('server','branch_rename',false);
373
456
 
374
457
/* If you set this, then phpldapadmin will show these attributes as
375
458
   internal attributes, even if they are not defined in your schema. */
376
 
// $ldapservers->SetValue($i,'server','custom_sys_attrs',array(''));
377
 
#  $ldapservers->SetValue($i,'server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));
 
459
// $servers->setValue('server','custom_sys_attrs',array(''));
 
460
#  $servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));
378
461
 
379
462
/* If you set this, then phpldapadmin will show these attributes on
380
463
   objects, even if they are not defined in your schema. */
381
 
// $ldapservers->SetValue($i,'server','custom_attrs',array(''));
382
 
#  $ldapservers->SetValue($i,'server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));
 
464
// $servers->setValue('server','custom_attrs',array(''));
 
465
#  $servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));
383
466
 
384
467
/* These attributes will be forced to MAY attributes and become option in the
385
468
   templates. If they are not defined in the templates, then they wont appear
387
470
   server may automatically calculate a default value.
388
471
   In Fedora Directory Server using the DNA Plugin one could ignore uidNumber,
389
472
   gidNumber and sambaSID. */
390
 
// $ldapservers->SetValue($i,'force_may','attrs',array(''));
391
 
#  $ldapservers->SetValue($i,'force_may','attrs',array('uidNumber','gidNumber','sambaSID'));
 
473
// $servers->setValue('force_may','attrs',array(''));
 
474
#  $servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID'));
 
475
 
 
476
/*********************************************/
 
477
/* Unique attributes                         */
 
478
/*********************************************/
 
479
 
 
480
/* You may want phpLDAPadmin to enforce some attributes to have unique values
 
481
   (ie: not belong to other entries in your tree. This (together with
 
482
   'unique','dn' and 'unique','pass' option will not let updates to
 
483
   occur with other attributes have the same value. */
 
484
#  $servers->setValue('unique','attrs',array('mail','uid','uidNumber'));
 
485
 
 
486
/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
 
487
   searching for attribute uniqueness. The idea is, this user id would have full
 
488
   (readonly) access to your ldap directory (the logged in user may not), so
 
489
   that you can be guaranteed to get a unique uidnumber for your directory. */
 
490
// $servers->setValue('unique','dn',null);
 
491
 
 
492
/* The password for the dn above. */
 
493
// $servers->setValue('unique','pass',null);
392
494
 
393
495
/**************************************************************************
394
496
 * If you want to configure additional LDAP servers, do so below.         *
397
499
 **************************************************************************/
398
500
 
399
501
/*
400
 
$i++;
401
 
$ldapservers->SetValue($i,'server','name','LDAP Server');
402
 
$ldapservers->SetValue($i,'server','host','127.0.0.1');
403
 
$ldapservers->SetValue($i,'server','port',389);
404
 
$ldapservers->SetValue($i,'server','base',array(''));
405
 
$ldapservers->SetValue($i,'server','auth_type','cookie');
406
 
$ldapservers->SetValue($i,'login','dn','');
407
 
$ldapservers->SetValue($i,'login','pass','');
408
 
$ldapservers->SetValue($i,'server','tls',false);
409
 
$ldapservers->SetValue($i,'server','low_bandwidth',false);
410
 
$ldapservers->SetValue($i,'appearance','password_hash','md5');
411
 
$ldapservers->SetValue($i,'login','attr','dn');
412
 
$ldapservers->SetValue($i,'login','string',null);
413
 
$ldapservers->SetValue($i,'login','class',null);
414
 
$ldapservers->SetValue($i,'server','read_only',false);
415
 
$ldapservers->SetValue($i,'appearance','show_create',true);
416
 
$ldapservers->SetValue($i,'auto_number','enable',true);
417
 
$ldapservers->SetValue($i,'auto_number','mechanism','search');
418
 
$ldapservers->SetValue($i,'auto_number','search_base',null);
419
 
$ldapservers->SetValue($i,'auto_number','min',1000);
420
 
$ldapservers->SetValue($i,'auto_number','dn',null);
421
 
$ldapservers->SetValue($i,'auto_number','pass',null);
422
 
$ldapservers->SetValue($i,'login','anon_bind',true);
423
 
$ldapservers->SetValue($i,'custom','pages_prefix','custom_');
424
 
$ldapservers->SetValue($i,'unique_attrs','dn',null);
425
 
$ldapservers->SetValue($i,'unique_attrs','pass',null);
 
502
$servers->newServer('ldap_pla');
 
503
$servers->setValue('server','name','LDAP Server');
 
504
$servers->setValue('server','host','127.0.0.1');
 
505
$servers->setValue('server','port',389);
 
506
$servers->setValue('server','base',array(''));
 
507
$servers->setValue('login','auth_type','cookie');
 
508
$servers->setValue('login','bind_id','');
 
509
$servers->setValue('login','bind_pass','');
 
510
$servers->setValue('server','tls',false);
426
511
 
427
512
# SASL auth
428
 
$ldapservers->SetValue($i,'server','sasl_auth',true);
429
 
$ldapservers->SetValue($i,'server','sasl_mech','PLAIN');
430
 
$ldapservers->SetValue($i,'server','sasl_realm','EXAMPLE.COM');
431
 
$ldapservers->SetValue($i,'server','sasl_authz_id',null);
432
 
$ldapservers->SetValue($i,'server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
433
 
$ldapservers->SetValue($i,'server','sasl_authz_id_replacement','$1');
434
 
$ldapservers->SetValue($i,'server','sasl_props',null);
 
513
$servers->setValue('server','sasl_auth',true);
 
514
$servers->setValue('server','sasl_mech','PLAIN');
 
515
$servers->setValue('server','sasl_realm','EXAMPLE.COM');
 
516
$servers->setValue('server','sasl_authz_id',null);
 
517
$servers->setValue('server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
 
518
$servers->setValue('server','sasl_authz_id_replacement','$1');
 
519
$servers->setValue('server','sasl_props',null);
 
520
 
 
521
$servers->setValue('appearance','password_hash','md5');
 
522
$servers->setValue('login','attr','dn');
 
523
$servers->setValue('login','fallback_dn',false);
 
524
$servers->setValue('login','class',null);
 
525
$servers->setValue('server','read_only',false);
 
526
$servers->setValue('appearance','show_create',true);
 
527
 
 
528
$servers->setValue('auto_number','enable',true);
 
529
$servers->setValue('auto_number','mechanism','search');
 
530
$servers->setValue('auto_number','search_base',null);
 
531
$servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500));
 
532
$servers->setValue('auto_number','dn',null);
 
533
$servers->setValue('auto_number','pass',null);
 
534
 
 
535
$servers->setValue('login','anon_bind',true);
 
536
$servers->setValue('custom','pages_prefix','custom_');
 
537
$servers->setValue('unique','attrs',array('mail','uid','uidNumber'));
 
538
$servers->setValue('unique','dn',null);
 
539
$servers->setValue('unique','pass',null);
 
540
 
 
541
$servers->setValue('server','visible',true);
 
542
$servers->setValue('login','timeout',30);
 
543
$servers->setValue('server','branch_rename',false);
 
544
$servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));
 
545
$servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));
 
546
$servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID'));
435
547
*/
436
 
 
437
 
/*********************************************/
438
 
/* User-friendly attribute translation       */
439
 
/*********************************************/
440
 
 
441
 
/* Use this array to map attribute names to user friendly names. For example, if
442
 
   you don't want to see "facsimileTelephoneNumber" but rather "Fax". */
443
 
$friendly_attrs = array();
444
 
 
445
 
$friendly_attrs['facsimileTelephoneNumber'] = 'Fax';
446
 
$friendly_attrs['telephoneNumber']          = 'Phone';
447
 
$friendly_attrs['uid']                      = 'User Name';
448
 
 
449
 
/*********************************************/
450
 
/* Support for attrs display order           */
451
 
/*********************************************/
452
 
 
453
 
/* Use this array if you want to have your attributes displayed in a specific
454
 
   order. You can use default attribute names or their fridenly names.
455
 
   For example, "sn" will be displayed right after "givenName". All the other
456
 
   attributes that are not specified in this array will be displayed after in
457
 
   alphabetical order. */
458
 
#  $attrs_display_order = array(
459
 
#   'givenName',
460
 
#   'sn',
461
 
#   'cn',
462
 
#   'displayName',
463
 
#   'uid',
464
 
#   'uidNumber',
465
 
#   'gidNumber',
466
 
#   'homeDirectory',
467
 
#   'mail',
468
 
#   'userPassword'
469
 
#  );
470
 
 
471
 
/*********************************************/
472
 
/* Hidden attributes                         */
473
 
/*********************************************/
474
 
 
475
 
/* You may want to hide certain attributes from being displayed in the editor
476
 
   screen. Do this by adding the desired attributes to this list (and uncomment
477
 
   it). This only affects the editor screen. Attributes will still be visible in
478
 
   the schema browser and elsewhere. An example is provided below:
479
 
   NOTE: The user must be able to read the hidden_except_dn entry to be
480
 
   excluded. */
481
 
#  $hidden_attrs = array( 'jpegPhoto', 'objectClass' );
482
 
#  $hidden_except_dn = "cn=PLA UnHide,ou=Groups,c=AU";
483
 
 
484
 
/* Hidden attributes in read-only mode. If undefined, it will be equal to
485
 
   $hidden_attrs. */
486
 
#  $hidden_attrs_ro = array(
487
 
#   'objectClass','shadowWarning', 'shadowLastChange', 'shadowMax',
488
 
#   'shadowFlag', 'shadowInactive', 'shadowMin', 'shadowExpire');
489
 
 
490
 
/**                                         **/
491
 
/** Read-only attributes                    **/
492
 
/**                                         **/
493
 
 
494
 
/* You may want to phpLDAPadmin to display certain attributes as read only,
495
 
   meaning that users will not be presented a form for modifying those
496
 
   attributes, and they will not be allowed to be modified on the "back-end"
497
 
   either. You may configure this list here:
498
 
   NOTE: The user must be able to read the read_only_except_dn entry to be
499
 
   excluded. */
500
 
#  $read_only_attrs = array( 'objectClass' );
501
 
#  $read_only_except_dn = "cn=PLA ReadWrite,ou=Groups,c=AU";
502
 
 
503
 
/* An example of how to specify multiple read-only attributes: */
504
 
#  $read_only_attrs = array( 'jpegPhoto', 'objectClass', 'someAttribute' );
505
 
 
506
 
/*********************************************/
507
 
/* Unique attributes                         */
508
 
/*********************************************/
509
 
 
510
 
/* You may want phpLDAPadmin to enforce some attributes to have unique values
511
 
   (ie: not belong to other entries in your tree. This (together with
512
 
   unique_attrs['dn'] and unique_attrs['pass'] option will not let updates to
513
 
   occur with other attributes have the same value.
514
 
   NOTE: Currently the unique_attrs is NOT enforced when copying a dn. (Need to
515
 
   present a user with the option of changing the unique attributes. */
516
 
#  $unique_attrs = array('uid','uidNumber','mail');
517
 
 
518
 
/*********************************************/
519
 
/* Group attributes                          */
520
 
/*********************************************/
521
 
 
522
 
/* Add "modify group members" link to the attribute. */
523
 
// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid');
524
 
 
525
 
/* Configure filter for member search. This only applies to "modify group members" feature */
526
 
// $config->custom->modify_member['filter'] = '(objectclass=Person)';
527
 
 
528
 
/* Attribute that is added to the group member attribute. */
529
 
// $config->custom->modify_member['attr'] = 'dn';
530
 
 
531
 
/*********************************************/
532
 
/* Predefined Queries (canned views)         */
533
 
/*********************************************/
534
 
 
535
 
/* To make searching easier, you may setup predefined queries below: */
536
 
$q=0;
537
 
$queries = array();
538
 
 
539
 
/* The name that will appear in the simple search form */
540
 
$queries[$q]['name'] = 'User List';
541
 
 
542
 
/* The base to search on */
543
 
$queries[$q]['base'] = 'dc=example,dc=com';
544
 
 
545
 
/* The search scope (sub, base, one) */
546
 
$queries[$q]['scope'] = 'sub';
547
 
 
548
 
/* The LDAP filter to use */
549
 
$queries[$q]['filter'] = '(&(objectClass=posixAccount)(uid=*))';
550
 
 
551
 
/* The attributes to return */
552
 
$queries[$q]['attributes'] = 'cn, uid, homeDirectory, telephonenumber, jpegphoto';
553
 
 
554
 
/* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */
555
 
$q++;
556
 
$queries[$q]['name'] = 'Samba Users';
557
 
$queries[$q]['base'] = 'dc=example,dc=com';
558
 
$queries[$q]['scope'] = 'sub';
559
 
$queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))';
560
 
$queries[$q]['attributes'] = 'uid, smbHome, uidNumber';
561
 
 
562
 
$q++;
563
 
$queries[$q]['name'] = 'Samba Computers';
564
 
$queries[$q]['base'] = 'dc=example,dc=com';
565
 
$queries[$q]['scope'] = 'sub';
566
 
$queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))';
567
 
$queries[$q]['attributes'] = 'uid, homeDirectory';
568
548
?>