3 ** Make sure that <?php is the FIRST line of this file!
4 ** IE: There should NOT be any blank lines or spaces BEFORE <?php
8 * The phpLDAPadmin config file
9 * See: http://phpldapadmin.sourceforge.net/wiki/index.php/Config.php
11 * This is where you can customise some of the phpLDAPadmin defaults
12 * that are defined in config_default.php.
14 * To override a default, use the $config->custom variable to do so.
15 * For example, the default for defining the language in config_default.php
17 * $this->default->appearance['language'] = array(
21 * to override this, use $config->custom->appearance['language'] = 'en_EN';
23 * This file is also used to configure your LDAP server connections.
25 * You must specify at least one LDAP server there. You may add
26 * as many as you like. You can also specify your language, and
29 * NOTE: Commented out values in this file prefixed by //, represent the
30 * defaults that have been defined in config_default.php.
31 * Commented out values prefixed by #, dont reflect their default value, you can
32 * check config_default.php if you want to see what the default is.
34 * DONT change config_default.php, you changes will be lost by the next release
35 * of PLA. Instead change this file - as it will NOT be replaced by a new
36 * version of phpLDAPadmin.
39 /*********************************************/
40 /* Useful important configuration overrides */
41 /*********************************************/
43 /* If you are asked to put PLA in debug mode, this is how you do it: */
44 # $config->custom->debug['level'] = 255;
45 # $config->custom->debug['syslog'] = true;
46 # $config->custom->debug['file'] = '/tmp/pla_debug.log';
48 /* phpLDAPadmin can encrypt the content of sensitive cookies if you set this
49 to a big random string. */
50 // $config->custom->session['blowfish'] = null;
52 /* The language setting. If you set this to 'auto', phpLDAPadmin will attempt
53 to determine your language automatically. Otherwise, available lanaguages
54 are: 'ct', 'de', 'en', 'es', 'fr', 'it', 'nl', and 'ru'
55 Localization is not complete yet, but most strings have been translated.
56 Please help by writing language files. See lang/en.php for an example. */
57 // $config->custom->appearance['language'] = 'auto';
59 /* The temporary storage directory where we will put jpegPhoto data
60 This directory must be readable and writable by your web server. */
61 // $config->custom->jpeg['tmpdir'] = '/tmp'; // Example for Unix systems
62 # $config->custom->jpeg['tmpdir'] = 'c:\\temp'; // Example for Windows systems
64 /* Set this to (bool)true if you do NOT want a random salt used when
65 calling crypt(). Instead, use the first two letters of the user's
66 password. This is insecure but unfortunately needed for some older
68 # $config->custom->password['no_random_crypt_salt'] = true;
70 /* PHP script timeout control. If php runs longer than this many seconds then
71 PHP will stop with an Maximum Execution time error. Increase this value from
72 the default if queries to your LDAP server are slow. The default is either
73 30 seconds or the setting of max_exection_time if this is null. */
74 // $config->custom->session['timelimit'] = 30;
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';
83 /*********************************************/
85 /*********************************************/
87 /* Command availability ; if you don't authorize a command the command
88 links will not be shown and the command action will not be permitted.
89 For better security, set also ACL in your ldap directory. */
91 $config->custom->commands['cmd'] = array(
92 'entry_internal_attributes_show' => true,
93 'entry_refresh' => true,
95 'switch_template' => true
98 $config->custom->commands['script'] = array(
99 'add_attr_form' => true,
100 'add_oclass_form' => true,
101 'add_value_form' => true,
104 'compare_form' => true,
108 'create_confirm' => true,
110 'delete_attr' => true,
111 'delete_form' => true,
112 'draw_tree_node' => true,
115 'export_form' => true,
117 'import_form' => true,
120 'login_form' => true,
121 'mass_delete' => true,
123 'mass_update' => true,
124 'modify_member_form' => true,
126 'purge_cache' => true,
127 'query_engine' => true,
129 'rename_form' => true,
133 'server_info' => true,
134 'show_cache' => true,
135 'template_engine' => true,
136 'update_confirm' => true,
141 /*********************************************/
143 /*********************************************/
145 // Use the displayName in the tree view, when available.
146 $config->custom->appearance['tree_display_format'] = array("%displayName", "%rdnValue");
148 /* If you want to choose the appearance of the tree, specify a class name which
149 inherits from the Tree class. */
150 // $config->custom->appearance['tree'] = 'AJAXTree';
151 # $config->custom->appearance['tree'] = 'HTMLTree';
153 /* Just show your custom templates. */
154 $config->custom->appearance['custom_templates_only'] = true;
156 /* Disable the default template. */
157 // $config->custom->appearance['disable_default_template'] = false;
159 /* Hide the warnings for invalid objectClasses/attributes in templates. */
160 // $config->custom->appearance['hide_template_warning'] = false;
162 /* Configure what objects are shown in left hand tree */
163 // $config->custom->appearance['tree_filter'] = '(objectclass=*)';
165 /* The height and width of the tree. If these values are not set, then
166 no tree scroll bars are provided. */
167 // $config->custom->appearance['tree_height'] = null;
168 # $config->custom->appearance['tree_height'] = 600;
169 // $config->custom->appearance['tree_width'] = null;
170 # $config->custom->appearance['tree_width'] = 250;
172 /*********************************************/
173 /* User-friendly attribute translation */
174 /*********************************************/
176 /* Use this array to map attribute names to user friendly names. For example, if
177 you don't want to see "facsimileTelephoneNumber" but rather "Fax". */
178 // $config->custom->appearance['friendly_attrs'] = array();
179 $config->custom->appearance['friendly_attrs'] = array(
180 'facsimileTelephoneNumber' => 'Fax',
183 'telephoneNumber' => 'Telephone',
184 'uid' => 'User Name',
185 'userPassword' => 'Password'
188 /*********************************************/
189 /* Hidden attributes */
190 /*********************************************/
192 /* You may want to hide certain attributes from being edited. If you want to
193 hide attributes from the user, you should use your LDAP servers ACLs.
194 NOTE: The user must be able to read the hide_attrs_exempt entry to be
196 // $config->custom->appearance['hide_attrs'] = array();
197 # $config->custom->appearance['hide_attrs'] = array('objectClass');
199 /* Members of this list will be exempt from the hidden attributes.*/
200 // $config->custom->appearance['hide_attrs_exempt'] = null;
201 # $config->custom->appearance['hide_attrs_exempt'] = 'cn=PLA UnHide,ou=Groups,c=AU';
203 /*********************************************/
204 /* Read-only attributes */
205 /*********************************************/
207 /* You may want to phpLDAPadmin to display certain attributes as read only,
208 meaning that users will not be presented a form for modifying those
209 attributes, and they will not be allowed to be modified on the "back-end"
210 either. You may configure this list here:
211 NOTE: The user must be able to read the readonly_attrs_exempt entry to be
213 // $config->custom->appearance['readonly_attrs'] = array();
215 /* Members of this list will be exempt from the readonly attributes.*/
216 // $config->custom->appearance['readonly_attrs_exempt'] = null;
217 # $config->custom->appearance['readonly_attrs_exempt'] = 'cn=PLA ReadWrite,ou=Groups,c=AU';
219 /*********************************************/
220 /* Group attributes */
221 /*********************************************/
223 /* Add "modify group members" link to the attribute. */
224 // $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid');
226 /* Configure filter for member search. This only applies to "modify group members" feature */
227 $config->custom->modify_member['filter'] = '(objectclass=simplePerson)';
229 /* Attribute that is added to the group member attribute. */
230 // $config->custom->modify_member['attr'] = 'dn';
232 /* For Posix attributes */
233 // $config->custom->modify_member['posixattr'] = 'uid';
234 // $config->custom->modify_member['posixfilter'] = '(uid=*)';
235 // $config->custom->modify_member['posixgroupattr'] = 'memberUid';
237 /*********************************************/
238 /* Support for attrs display order */
239 /*********************************************/
241 /* Use this array if you want to have your attributes displayed in a specific
242 order. You can use default attribute names or their fridenly names.
243 For example, "sn" will be displayed right after "givenName". All the other
244 attributes that are not specified in this array will be displayed after in
245 alphabetical order. */
246 // $config->custom->appearance['attr_display_order'] = array();
247 # $config->custom->appearance['attr_display_order'] = array(
260 /*********************************************/
261 /* Define your LDAP servers in this section */
262 /*********************************************/
264 $servers = new Datastore();
266 /* $servers->NewServer('ldap_pla') must be called before each new LDAP server
268 $servers->newServer('ldap_pla');
270 /* A convenient name that will appear in the tree viewer and throughout
271 phpLDAPadmin to identify this LDAP server to users. */
272 $servers->setValue('server','name','My LDAP Server');
276 'ldaps://ldap.example.com/',
277 'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
278 (Unix socket at /usr/local/var/run/ldap) */
279 $servers->setValue('server','host','ldap.drsnuggles.stderr.nl');
281 /* The port your LDAP server listens on (no quotes). 389 is standard. */
282 // $servers->setValue('server','port',389);
284 /* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
285 auto-detect it for you. */
286 $servers->setValue('server','base',array('dc=drsnuggles,dc=stderr,dc=nl'));
288 /* Four options for auth_type:
289 1. 'cookie': you will login via a web form, and a client-side cookie will
290 store your login dn and password.
291 2. 'session': same as cookie but your login dn and password are stored on the
292 web server in a persistent session variable.
293 3. 'http': same as session but your login dn and password are retrieved via
295 4. 'config': specify your login dn and password here in this config file. No
296 login will be required to use phpLDAPadmin for this server.
298 Choose wisely to protect your authentication information appropriately for
299 your situation. If you choose 'cookie', your cookie contents will be
300 encrypted using blowfish and the secret your specify above as
301 session['blowfish']. */
302 $servers->setValue('login','auth_type','session');
304 /* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
305 'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If
306 you specify a login_attr in conjunction with a cookie or session auth_type,
307 then you can also specify the bind_id/bind_pass here for searching the
308 directory for users (ie, if your LDAP server does not allow anonymous binds. */
309 $servers->setValue('login','bind_id','cn=admin,dc=drsnuggles,dc=stderr,dc=nl');
310 # $servers->setValue('login','bind_id','cn=Manager,dc=example,dc=com');
312 /* Your LDAP password. If you specified an empty bind_id above, this MUST also
314 // $servers->setValue('login','bind_pass','');
315 # $servers->setValue('login','bind_pass','secret');
317 /* Use TLS (Transport Layer Security) to connect to the LDAP server. */
318 // $servers->setValue('server','tls',false);
320 /************************************
321 * SASL Authentication *
322 ************************************/
324 /* Enable SASL authentication LDAP SASL authentication requires PHP 5.x
325 configured with --with-ldap-sasl=DIR. If this option is disabled (ie, set to
326 false), then all other sasl options are ignored. */
327 // $servers->setValue('server','sasl_auth',false);
329 /* SASL auth mechanism */
330 // $servers->setValue('server','sasl_mech','PLAIN');
332 /* SASL authentication realm name */
333 // $servers->setValue('server','sasl_realm','');
334 # $servers->setValue('server','sasl_realm','example.com');
336 /* SASL authorization ID name
337 If this option is undefined, authorization id will be computed from bind DN,
338 using sasl_authz_id_regex and sasl_authz_id_replacement. */
339 // $servers->setValue('server','sasl_authz_id', null);
341 /* SASL authorization id regex and replacement
342 When sasl_authz_id property is not set (default), phpLDAPAdmin will try to
343 figure out authorization id by itself from bind distinguished name (DN).
345 This procedure is done by calling preg_replace() php function in the
348 $authz_id = preg_replace($sasl_authz_id_regex,$sasl_authz_id_replacement,
351 For info about pcre regexes, see:
353 - http://www.php.net/preg_replace */
354 // $servers->setValue('server','sasl_authz_id_regex',null);
355 // $servers->setValue('server','sasl_authz_id_replacement',null);
356 # $servers->setValue('server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
357 # $servers->setValue('server','sasl_authz_id_replacement','$1');
359 /* SASL auth security props.
360 See http://beepcore-tcl.sourceforge.net/tclsasl.html#anchor5 for explanation. */
361 // $servers->setValue('server','sasl_props',null);
363 /* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5,
364 blowfish, crypt or leave blank for now default algorithm. */
365 // $servers->setValue('appearance','password_hash','md5');
367 /* If you specified 'cookie' or 'session' as the auth_type above, you can
368 optionally specify here an attribute to use when logging in. If you enter
369 'uid' and login as 'dsmith', phpLDAPadmin will search for (uid=dsmith)
370 and log in as that user.
371 Leave blank or specify 'dn' to use full DN for logging in. Note also that if
372 your LDAP server requires you to login to perform searches, you can enter the
373 DN to use when searching in 'bind_id' and 'bind_pass' above.
374 // $servers->setValue('login','attr','dn');
376 /* Base DNs to used for logins. If this value is not set, then the LDAP server
377 Base DNs are used. */
378 // $servers->setValue('login','base',array());
380 /* If 'login,attr' is used above such that phpLDAPadmin will search for your DN
381 at login, you may restrict the search to a specific objectClasses. EG, set this
382 to array('posixAccount') or array('inetOrgPerson',..), depending upon your
384 // $servers->setValue('login','class',array());
386 /* If you specified something different from 'dn', for example 'uid', as the
387 login_attr above, you can optionally specify here to fall back to
388 authentication with dn.
389 This is useful, when users should be able to log in with their uid, but
390 the ldap administrator wants to log in with his root-dn, that does not
391 necessarily have the uid attribute.
392 When using this feature, login_class is ignored. */
393 // $servers->setValue('login','fallback_dn',false);
395 /* Specify true If you want phpLDAPadmin to not display or permit any
396 modification to the LDAP server. */
397 // $servers->setValue('server','read_only',false);
399 /* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links
400 in the tree viewer. */
401 // $servers->setValue('appearance','show_create',true);
403 /* This feature allows phpLDAPadmin to automatically determine the next
404 available uidNumber for a new entry. */
405 // $servers->setValue('auto_number','enable',true);
407 /* The mechanism to use when finding the next available uidNumber. Two possible
408 values: 'uidpool' or 'search'.
409 The 'uidpool' mechanism uses an existing uidPool entry in your LDAP server to
410 blindly lookup the next available uidNumber. The 'search' mechanism searches
411 for entries with a uidNumber value and finds the first available uidNumber
413 // $servers->setValue('auto_number','mechanism','search');
415 /* The DN of the search base when the 'search' mechanism is used above. */
416 # $servers->setValue('auto_number','search_base','ou=People,dc=example,dc=com');
418 /* The minimum number to use when searching for the next available number
419 (only when 'search' is used for auto_number */
420 $servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500,'uniqueIdentifier'=>0));
422 /* If you set this, then phpldapadmin will bind to LDAP with this user ID when
423 searching for the uidnumber. The idea is, this user id would have full
424 (readonly) access to uidnumber in your ldap directory (the logged in user
425 may not), so that you can be guaranteed to get a unique uidnumber for your
427 // $servers->setValue('auto_number','dn',null);
429 /* The password for the dn above. */
430 // $servers->setValue('auto_number','pass',null);
432 /* Enable anonymous bind login. */
433 // $servers->setValue('login','anon_bind',true);
435 /* Use customized page with prefix when available. */
436 # $servers->setValue('custom','pages_prefix','custom_');
438 /* If you set this, then only these DNs are allowed to log in. This array can
439 contain individual users, groups or ldap search filter(s). Keep in mind that
440 the user has not authenticated yet, so this will be an anonymous search to
441 the LDAP server, so make your ACLs allow these searches to return results! */
442 # $servers->setValue('login','allowed_dns',array(
443 # 'uid=stran,ou=People,dc=example,dc=com',
444 # '(&(gidNumber=811)(objectClass=groupOfNames))',
445 # '(|(uidNumber=200)(uidNumber=201))',
446 # 'cn=callcenter,ou=Group,dc=example,dc=com'));
448 /* Set this if you dont want this LDAP server to show in the tree */
449 // $servers->setValue('server','visible',true);
451 /* This is the time out value in minutes for the server. After as many minutes
452 of inactivity you will be automatically logged out. If not set, the default
453 value will be ( session_cache_expire()-1 ) */
454 # $servers->setValue('login','timeout',30);
456 /* Set this if you want phpldapadmin to perform rename operation on entry which
457 has children. Certain servers are known to allow it, certain are not */
458 // $servers->setValue('server','branch_rename',false);
460 /* If you set this, then phpldapadmin will show these attributes as
461 internal attributes, even if they are not defined in your schema. */
462 // $servers->setValue('server','custom_sys_attrs',array(''));
463 # $servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));
465 /* If you set this, then phpldapadmin will show these attributes on
466 objects, even if they are not defined in your schema. */
467 // $servers->setValue('server','custom_attrs',array(''));
468 # $servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));
470 /* These attributes will be forced to MAY attributes and become option in the
471 templates. If they are not defined in the templates, then they wont appear
472 as per normal template processing. You may want to do this becuase your LDAP
473 server may automatically calculate a default value.
474 In Fedora Directory Server using the DNA Plugin one could ignore uidNumber,
475 gidNumber and sambaSID. */
476 // $servers->setValue('force_may','attrs',array(''));
477 # $servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID'));
479 /*********************************************/
480 /* Unique attributes */
481 /*********************************************/
483 /* You may want phpLDAPadmin to enforce some attributes to have unique values
484 (ie: not belong to other entries in your tree. This (together with
485 'unique','dn' and 'unique','pass' option will not let updates to
486 occur with other attributes have the same value. */
487 # $servers->setValue('unique','attrs',array('mail','uid','uidNumber'));
489 /* If you set this, then phpldapadmin will bind to LDAP with this user ID when
490 searching for attribute uniqueness. The idea is, this user id would have full
491 (readonly) access to your ldap directory (the logged in user may not), so
492 that you can be guaranteed to get a unique uidnumber for your directory. */
493 // $servers->setValue('unique','dn',null);
495 /* The password for the dn above. */
496 // $servers->setValue('unique','pass',null);
498 /**************************************************************************
499 * If you want to configure additional LDAP servers, do so below. *
500 * Remove the commented lines and use this section as a template for all *
501 * your other LDAP servers. *
502 **************************************************************************/
505 $servers->newServer('ldap_pla');
506 $servers->setValue('server','name','LDAP Server');
507 $servers->setValue('server','host','127.0.0.1');
508 $servers->setValue('server','port',389);
509 $servers->setValue('server','base',array(''));
510 $servers->setValue('login','auth_type','cookie');
511 $servers->setValue('login','bind_id','');
512 $servers->setValue('login','bind_pass','');
513 $servers->setValue('server','tls',false);
516 $servers->setValue('server','sasl_auth',true);
517 $servers->setValue('server','sasl_mech','PLAIN');
518 $servers->setValue('server','sasl_realm','EXAMPLE.COM');
519 $servers->setValue('server','sasl_authz_id',null);
520 $servers->setValue('server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
521 $servers->setValue('server','sasl_authz_id_replacement','$1');
522 $servers->setValue('server','sasl_props',null);
524 $servers->setValue('appearance','password_hash','md5');
525 $servers->setValue('login','attr','dn');
526 $servers->setValue('login','fallback_dn',false);
527 $servers->setValue('login','class',null);
528 $servers->setValue('server','read_only',false);
529 $servers->setValue('appearance','show_create',true);
531 $servers->setValue('auto_number','enable',true);
532 $servers->setValue('auto_number','mechanism','search');
533 $servers->setValue('auto_number','search_base',null);
534 $servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500));
535 $servers->setValue('auto_number','dn',null);
536 $servers->setValue('auto_number','pass',null);
538 $servers->setValue('login','anon_bind',true);
539 $servers->setValue('custom','pages_prefix','custom_');
540 $servers->setValue('unique','attrs',array('mail','uid','uidNumber'));
541 $servers->setValue('unique','dn',null);
542 $servers->setValue('unique','pass',null);
544 $servers->setValue('server','visible',true);
545 $servers->setValue('login','timeout',30);
546 $servers->setValue('server','branch_rename',false);
547 $servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));
548 $servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));
549 $servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID'));