From f7dca5e366df2ec527499431028a20cab323d8fd Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 15 Apr 2010 12:28:14 +0200 Subject: [PATCH] phpldapadmin: Upgrade configuration to 1.2.0.5. --- etc/phpldapadmin/config.php | 606 +++++++++--------- etc/phpldapadmin/templates/creation/alias.xml | 19 +- .../templates/creation/courierMailAccount.xml | 68 +- .../templates/creation/courierMailAlias.xml | 12 +- .../templates/creation/dNSDomain.xml | 16 +- .../templates/creation/example.xml | 15 +- .../templates/creation/inetOrgPerson.xml | 32 +- .../templates/creation/kolabPerson.xml | 51 +- .../templates/creation/mozillaOrgPerson.xml | 132 ++-- .../templates/creation/organizationalRole.xml | 28 +- etc/phpldapadmin/templates/creation/ou.xml | 12 +- .../templates/creation/posixAccount.xml | 73 +-- .../templates/creation/posixGroup.xml | 18 +- .../templates/creation/sambaDomain.xml | 13 +- .../templates/creation/sambaGroupMapping.xml | 37 +- .../templates/creation/sambaMachine.xml | 42 +- .../templates/creation/sambaSamAccount.xml | 106 ++- .../creation/sendmailMTAAliasObject.xml | 18 +- .../templates/creation/sendmailMTAClass.xml | 15 +- .../templates/creation/sendmailMTACluster.xml | 11 +- .../creation/sendmailMTAMapObject.xml | 35 +- .../creation/sendmailVirtualDomain.xml | 15 +- .../creation/sendmailVirtualUser.xml | 22 +- .../creation/simpleSecurityObject.xml | 34 +- .../templates/modification/inetOrgPerson.xml | 43 +- etc/phpldapadmin/templates/template.dtd | 53 +- 26 files changed, 765 insertions(+), 761 deletions(-) diff --git a/etc/phpldapadmin/config.php b/etc/phpldapadmin/config.php index 6d6a00e..e6e935b 100644 --- a/etc/phpldapadmin/config.php +++ b/etc/phpldapadmin/config.php @@ -6,6 +6,7 @@ /** * The phpLDAPadmin config file + * See: http://phpldapadmin.sourceforge.net/wiki/index.php/Config.php * * This is where you can customise some of the phpLDAPadmin defaults * that are defined in config_default.php. @@ -13,11 +14,11 @@ * To override a default, use the $config->custom variable to do so. * For example, the default for defining the language in config_default.php * - * $this->default->appearance['lang'] = array( + * $this->default->appearance['language'] = array( * 'desc'=>'Language', * 'default'=>'auto'); * - * to override this, use $config->custom->appearance['lang'] = 'en'; + * to override this, use $config->custom->appearance['language'] = 'en_EN'; * * This file is also used to configure your LDAP server connections. * @@ -39,7 +40,7 @@ /* Useful important configuration overrides */ /*********************************************/ -/* If you are asked to put pla in debug mode, this is how you do it: */ +/* If you are asked to put PLA in debug mode, this is how you do it: */ # $config->custom->debug['level'] = 255; # $config->custom->debug['syslog'] = true; # $config->custom->debug['file'] = '/tmp/pla_debug.log'; @@ -57,8 +58,8 @@ /* The temporary storage directory where we will put jpegPhoto data This directory must be readable and writable by your web server. */ -// $config->custom->jpeg['tmpdir'] = "/tmp"; // Example for Unix systems -# $config->custom->jpeg['tmpdir'] = "c:\\temp"; // Example for Windows systems +// $config->custom->jpeg['tmpdir'] = '/tmp'; // Example for Unix systems +# $config->custom->jpeg['tmpdir'] = 'c:\\temp'; // Example for Windows systems /* Set this to (bool)true if you do NOT want a random salt used when calling crypt(). Instead, use the first two letters of the user's @@ -72,6 +73,13 @@ 30 seconds or the setting of max_exection_time if this is null. */ // $config->custom->session['timelimit'] = 30; +/* Our local timezone + This is to make sure that when we ask the system for the current time, we + get the right local time. If this is not set, all time() calculations will + assume UTC if you have not set PHP date.timezone. */ +// $config->custom->appearance['timezone'] = null; +# $config->custom->appearance['timezone'] = 'Australia/Melbourne'; + /*********************************************/ /* Commands */ /*********************************************/ @@ -79,37 +87,55 @@ /* Command availability ; if you don't authorize a command the command links will not be shown and the command action will not be permitted. For better security, set also ACL in your ldap directory. */ - /* -$config->custom->commands['all'] = array( - 'home' => true, - 'external_links' => array('feature' => true, - 'bug' => true, - 'donation' => true, - 'help' => true, - 'credits' => true), - 'purge' => true, - 'schema' => true, - 'import' => true, - 'export' => true, - 'logout' => true, - 'search' => array('simple_search' => true, - 'predefined_search' => true, - 'advanced_search' => true), - 'server_refresh' => true, - 'server_info' => true, - 'entry_refresh' => true, - 'entry_move' => true, - 'entry_internal_attributes_show' => true, - 'entry_delete' => array('simple_delete' => true, - 'mass_delete' => false), - 'entry_rename' => true, - 'entry_compare' => true, - 'entry_create' => true, - 'attribute_add' => true, - 'attribute_add_value' => true, - 'attribute_delete' => true, - 'attribute_delete_value' => true); +$config->custom->commands['cmd'] = array( + 'entry_internal_attributes_show' => true, + 'entry_refresh' => true, + 'oslinks' => true, + 'switch_template' => true +); + +$config->custom->commands['script'] = array( + 'add_attr_form' => true, + 'add_oclass_form' => true, + 'add_value_form' => true, + 'collapse' => true, + 'compare' => true, + 'compare_form' => true, + 'copy' => true, + 'copy_form' => true, + 'create' => true, + 'create_confirm' => true, + 'delete' => true, + 'delete_attr' => true, + 'delete_form' => true, + 'draw_tree_node' => true, + 'expand' => true, + 'export' => true, + 'export_form' => true, + 'import' => true, + 'import_form' => true, + 'login' => true, + 'logout' => true, + 'login_form' => true, + 'mass_delete' => true, + 'mass_edit' => true, + 'mass_update' => true, + 'modify_member_form' => true, + 'monitor' => true, + 'purge_cache' => true, + 'query_engine' => true, + 'rename' => true, + 'rename_form' => true, + 'rdelete' => true, + 'refresh' => true, + 'schema' => true, + 'server_info' => true, + 'show_cache' => true, + 'template_engine' => true, + 'update_confirm' => true, + 'update' => true +); */ /*********************************************/ @@ -117,63 +143,147 @@ $config->custom->commands['all'] = array( /*********************************************/ // Use the displayName in the tree view, when available. -$config->custom->appearance['tree_display_formats'] = array("%displayName", "%rdnValue"); - -// Only use custom templates (starting with custom_) -$config->custom->appearance['custom_templates_only'] = true; +$config->custom->appearance['tree_display_format'] = array("%displayName", "%rdnValue"); /* If you want to choose the appearance of the tree, specify a class name which inherits from the Tree class. */ -// $config->custom->appearance['tree'] = "AJAXTree"; -# $config->custom->appearance['tree'] = "HTMLTree"; - -/* If you want to customise the entry view/edition, specify your factory name which - inherits from the EntryFactory class. - The 'DefaultEntryFactory' draws all the attributes of an entry according this - config file and the ldap schema definition ; the 'TemplateEntryFactory' draws - an entry according to the template whose regexp matches with the dn. */ -# $config->custom->appearance['entry_factory'] = "DefaultEntryFactory"; -// $config->custom->appearance['entry_factory'] = "TemplateEntryFactory"; - -/* If you want to customise an attribute view/edition, specify your factory name which - inherits from the AttributeFactory class. - An AttributeFactory defines which class to use to represent a given attribute */ -// $config->custom->appearance['attribute_factory'] = "AttributeFactory"; +// $config->custom->appearance['tree'] = 'AJAXTree'; +# $config->custom->appearance['tree'] = 'HTMLTree'; + +/* Just show your custom templates. */ +$config->custom->appearance['custom_templates_only'] = true; + +/* Disable the default template. */ +// $config->custom->appearance['disable_default_template'] = false; + +/* Hide the warnings for invalid objectClasses/attributes in templates. */ +// $config->custom->appearance['hide_template_warning'] = false; /* Configure what objects are shown in left hand tree */ // $config->custom->appearance['tree_filter'] = '(objectclass=*)'; /* The height and width of the tree. If these values are not set, then - no tree scroll bars are provided. + no tree scroll bars are provided. */ // $config->custom->appearance['tree_height'] = null; # $config->custom->appearance['tree_height'] = 600; // $config->custom->appearance['tree_width'] = null; # $config->custom->appearance['tree_width'] = 250; +/*********************************************/ +/* User-friendly attribute translation */ +/*********************************************/ + +/* Use this array to map attribute names to user friendly names. For example, if + you don't want to see "facsimileTelephoneNumber" but rather "Fax". */ +// $config->custom->appearance['friendly_attrs'] = array(); +$config->custom->appearance['friendly_attrs'] = array( + 'facsimileTelephoneNumber' => 'Fax', + 'gid' => 'Group', + 'mail' => 'Email', + 'telephoneNumber' => 'Telephone', + 'uid' => 'User Name', + 'userPassword' => 'Password' +); + +/*********************************************/ +/* Hidden attributes */ +/*********************************************/ + +/* You may want to hide certain attributes from being edited. If you want to + hide attributes from the user, you should use your LDAP servers ACLs. + NOTE: The user must be able to read the hide_attrs_exempt entry to be + excluded. */ +// $config->custom->appearance['hide_attrs'] = array(); +# $config->custom->appearance['hide_attrs'] = array('objectClass'); + +/* Members of this list will be exempt from the hidden attributes.*/ +// $config->custom->appearance['hide_attrs_exempt'] = null; +# $config->custom->appearance['hide_attrs_exempt'] = 'cn=PLA UnHide,ou=Groups,c=AU'; + +/*********************************************/ +/* Read-only attributes */ +/*********************************************/ + +/* You may want to phpLDAPadmin to display certain attributes as read only, + meaning that users will not be presented a form for modifying those + attributes, and they will not be allowed to be modified on the "back-end" + either. You may configure this list here: + NOTE: The user must be able to read the readonly_attrs_exempt entry to be + excluded. */ +// $config->custom->appearance['readonly_attrs'] = array(); + +/* Members of this list will be exempt from the readonly attributes.*/ +// $config->custom->appearance['readonly_attrs_exempt'] = null; +# $config->custom->appearance['readonly_attrs_exempt'] = 'cn=PLA ReadWrite,ou=Groups,c=AU'; + +/*********************************************/ +/* Group attributes */ +/*********************************************/ + +/* Add "modify group members" link to the attribute. */ +// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid'); + +/* Configure filter for member search. This only applies to "modify group members" feature */ +// $config->custom->modify_member['filter'] = '(objectclass=Person)'; + +/* Attribute that is added to the group member attribute. */ +// $config->custom->modify_member['attr'] = 'dn'; + +/* For Posix attributes */ +// $config->custom->modify_member['posixattr'] = 'uid'; +// $config->custom->modify_member['posixfilter'] = '(uid=*)'; +// $config->custom->modify_member['posixgroupattr'] = 'memberUid'; + +/*********************************************/ +/* Support for attrs display order */ +/*********************************************/ + +/* Use this array if you want to have your attributes displayed in a specific + order. You can use default attribute names or their fridenly names. + For example, "sn" will be displayed right after "givenName". All the other + attributes that are not specified in this array will be displayed after in + alphabetical order. */ +// $config->custom->appearance['attr_display_order'] = array(); +# $config->custom->appearance['attr_display_order'] = array( +# 'givenName', +# 'sn', +# 'cn', +# 'displayName', +# 'uid', +# 'uidNumber', +# 'gidNumber', +# 'homeDirectory', +# 'mail', +# 'userPassword' +# ); + /*********************************************/ /* Define your LDAP servers in this section */ /*********************************************/ -$i=0; -$ldapservers = new LDAPServers; +$servers = new Datastore(); + +/* $servers->NewServer('ldap_pla') must be called before each new LDAP server + declaration. */ +$servers->newServer('ldap_pla'); /* A convenient name that will appear in the tree viewer and throughout phpLDAPadmin to identify this LDAP server to users. */ -$ldapservers->SetValue($i,'server','name','My LDAP Server'); +$servers->setValue('server','name','My LDAP Server'); /* Examples: 'ldap.example.com', 'ldaps://ldap.example.com/', 'ldapi://%2fusr%local%2fvar%2frun%2fldapi' (Unix socket at /usr/local/var/run/ldap) */ -$ldapservers->SetValue($i,'server','host','ldap.drsnuggles.stderr.nl'); +$servers->setValue('server','host','ldap.drsnuggles.stderr.nl'); /* The port your LDAP server listens on (no quotes). 389 is standard. */ -// $ldapservers->SetValue($i,'server','port','389'); +// $servers->setValue('server','port',389); /* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin auto-detect it for you. */ -$ldapservers->SetValue($i,'server','base',array('dc=drsnuggles,dc=stderr,dc=nl')); +$servers->setValue('server','base',array('dc=drsnuggles,dc=stderr,dc=nl')); /* Four options for auth_type: 1. 'cookie': you will login via a web form, and a client-side cookie will @@ -189,28 +299,23 @@ $ldapservers->SetValue($i,'server','base',array('dc=drsnuggles,dc=stderr,dc=nl') your situation. If you choose 'cookie', your cookie contents will be encrypted using blowfish and the secret your specify above as session['blowfish']. */ -$ldapservers->SetValue($i,'server','auth_type','session'); +$servers->setValue('login','auth_type','session'); /* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or 'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If you specify a login_attr in conjunction with a cookie or session auth_type, - then you can also specify the login_dn/login_pass here for searching the + then you can also specify the bind_id/bind_pass here for searching the directory for users (ie, if your LDAP server does not allow anonymous binds. */ -// $ldapservers->SetValue($i,'login','dn',''); - $ldapservers->SetValue($i,'login','dn','cn=admin,dc=drsnuggles,dc=stderr,dc=nl'); +$servers->setValue('login','bind_id','cn=admin,dc=drsnuggles,dc=stderr,dc=nl'); +# $servers->setValue('login','bind_id','cn=Manager,dc=example,dc=com'); -/* Your LDAP password. If you specified an empty login_dn above, this MUST also +/* Your LDAP password. If you specified an empty bind_id above, this MUST also be blank. */ -// $ldapservers->SetValue($i,'login','pass',''); - $ldapservers->SetValue($i,'login','pass',''); - -// Make sure that uniqueNumber doesn't start counting at 1000. The uidNumbers -// will still work correctly, since they start counting at whatever minimal -// value is in the directory already. - $ldapservers->SetValue($i,'auto_number','min',0); +// $servers->setValue('login','bind_pass',''); +# $servers->setValue('login','bind_pass','secret'); /* Use TLS (Transport Layer Security) to connect to the LDAP server. */ -// $ldapservers->SetValue($i,'server','tls',false); +// $servers->setValue('server','tls',false); /************************************ * SASL Authentication * @@ -219,19 +324,19 @@ $ldapservers->SetValue($i,'server','auth_type','session'); /* Enable SASL authentication LDAP SASL authentication requires PHP 5.x configured with --with-ldap-sasl=DIR. If this option is disabled (ie, set to false), then all other sasl options are ignored. */ -// $ldapservers->SetValue($i,'server','sasl_auth',false); +// $servers->setValue('server','sasl_auth',false); /* SASL auth mechanism */ -// $ldapservers->SetValue($i,'server','sasl_mech','PLAIN'); +// $servers->setValue('server','sasl_mech','PLAIN'); /* SASL authentication realm name */ -// $ldapservers->SetValue($i,'server','sasl_realm',''); -# $ldapservers->SetValue($i,'server','sasl_realm',"example.com"); +// $servers->setValue('server','sasl_realm',''); +# $servers->setValue('server','sasl_realm','example.com'); /* SASL authorization ID name If this option is undefined, authorization id will be computed from bind DN, using sasl_authz_id_regex and sasl_authz_id_replacement. */ -// $ldapservers->SetValue($i,'server','sasl_authz_id', null); +// $servers->setValue('server','sasl_authz_id', null); /* SASL authorization id regex and replacement When sasl_authz_id property is not set (default), phpLDAPAdmin will try to @@ -246,24 +351,18 @@ $ldapservers->SetValue($i,'server','auth_type','session'); For info about pcre regexes, see: - pcre(3), perlre(3) - http://www.php.net/preg_replace */ -// $ldapservers->SetValue($i,'server','sasl_authz_id_regex',null); -// $ldapservers->SetValue($i,'server','sasl_authz_id_replacement',null); -# $ldapservers->SetValue($i,'server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i'); -# $ldapservers->SetValue($i,'server','sasl_authz_id_replacement','$1'); +// $servers->setValue('server','sasl_authz_id_regex',null); +// $servers->setValue('server','sasl_authz_id_replacement',null); +# $servers->setValue('server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i'); +# $servers->setValue('server','sasl_authz_id_replacement','$1'); /* SASL auth security props. - See http://beepcore-tcl.sourceforge.net/tclsasl.html#anchor5 for explanation. -*/ -// $ldapservers->SetValue($i,'server','sasl_props',null); - -/* If the link between your web server and this LDAP server is slow, it is - recommended that you set 'low_bandwidth' to true. This will enable - phpLDAPadmin to forego some "fancy" features to conserve bandwidth. */ -// $ldapservers->SetValue($i,'server','low_bandwidth',false); + See http://beepcore-tcl.sourceforge.net/tclsasl.html#anchor5 for explanation. */ +// $servers->setValue('server','sasl_props',null); /* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5, blowfish, crypt or leave blank for now default algorithm. */ -// $ldapservers->SetValue($i,'appearance','password_hash','md5'); +// $servers->setValue('appearance','password_hash','md5'); /* If you specified 'cookie' or 'session' as the auth_type above, you can optionally specify here an attribute to use when logging in. If you enter @@ -271,43 +370,39 @@ $ldapservers->SetValue($i,'server','auth_type','session'); and log in as that user. Leave blank or specify 'dn' to use full DN for logging in. Note also that if your LDAP server requires you to login to perform searches, you can enter the - DN to use when searching in 'login_dn' and 'login_pass' above. You may also - specify 'string', in which case you can provide a string to use for logging - users in. See 'login_string' directly below. */ -// $ldapservers->SetValue($i,'login','attr','dn'); + DN to use when searching in 'bind_id' and 'bind_pass' above. +// $servers->setValue('login','attr','dn'); + +/* Base DNs to used for logins. If this value is not set, then the LDAP server + Base DNs are used. */ +// $servers->setValue('login','base',array()); + +/* If 'login,attr' is used above such that phpLDAPadmin will search for your DN + at login, you may restrict the search to a specific objectClasses. EG, set this + to array('posixAccount') or array('inetOrgPerson',..), depending upon your + setup. */ +// $servers->setValue('login','class',array()); /* If you specified something different from 'dn', for example 'uid', as the login_attr above, you can optionally specify here to fall back to authentication with dn. This is useful, when users should be able to log in with their uid, but the ldap administrator wants to log in with his root-dn, that does not - necessarily have the uid attribute. */ -// $ldapservers->SetValue($i,'login','fallback_dn',false); - -/* If you specified 'cookie' or 'session' as the auth_type above, and you - specified 'string' for 'login_attr' above, you must provide a string here for - logging users in. If, for example, I have a lot of user entries with DNs like - "uid=dsmith,ou=People,dc=example,dc=com", then I can specify a string - "uid=,ou=People,dc=example,dc=com" and my users can login with - their user names alone, ie: "dsmith" in this case. */ -# $ldapservers->SetValue($i,'login','string','uid=,ou=People,dc=example,dc=com'); - -/* If 'login_attr' is used above such that phpLDAPadmin will search for your DN - at login, you may restrict the search to a specific objectClass. EG, set this - to 'posixAccount' or 'inetOrgPerson', depending upon your setup. */ -// $ldapservers->SetValue($i,'login','class',null); + necessarily have the uid attribute. + When using this feature, login_class is ignored. */ +// $servers->setValue('login','fallback_dn',false); /* Specify true If you want phpLDAPadmin to not display or permit any modification to the LDAP server. */ -// $ldapservers->SetValue($i,'server','read_only',false); +// $servers->setValue('server','read_only',false); /* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links in the tree viewer. */ -// $ldapservers->SetValue($i,'appearance','show_create',true); +// $servers->setValue('appearance','show_create',true); /* This feature allows phpLDAPadmin to automatically determine the next available uidNumber for a new entry. */ -// $ldapservers->SetValue($i,'auto_number','enable',true); +// $servers->setValue('auto_number','enable',true); /* The mechanism to use when finding the next available uidNumber. Two possible values: 'uidpool' or 'search'. @@ -315,178 +410,71 @@ $ldapservers->SetValue($i,'server','auth_type','session'); blindly lookup the next available uidNumber. The 'search' mechanism searches for entries with a uidNumber value and finds the first available uidNumber (slower). */ -// $ldapservers->SetValue($i,'auto_number','mechanism','search'); +// $servers->setValue('auto_number','mechanism','search'); /* The DN of the search base when the 'search' mechanism is used above. */ -# $ldapservers->SetValue($i,'auto_number','search_base','ou=People,dc=example,dc=com'); - -/* The minimum number to use when searching for the next available UID number - (only when 'search' is used for auto_uid_number_mechanism' */ -// $ldapservers->SetValue($i,'auto_number','min','1000'); +# $servers->setValue('auto_number','search_base','ou=People,dc=example,dc=com'); -/* The DN of the uidPool entry when 'uidpool' mechanism is used above. */ -# $servers[$i]['auto_uid_number_uid_pool_dn'] = 'cn=uidPool,dc=example,dc=com'; +/* The minimum number to use when searching for the next available number + (only when 'search' is used for auto_number */ +$servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500,'uniqueIdentifier'=>0)); /* If you set this, then phpldapadmin will bind to LDAP with this user ID when searching for the uidnumber. The idea is, this user id would have full (readonly) access to uidnumber in your ldap directory (the logged in user may not), so that you can be guaranteed to get a unique uidnumber for your directory. */ -// $ldapservers->SetValue($i,'auto_number','dn',null); +// $servers->setValue('auto_number','dn',null); /* The password for the dn above. */ -// $ldapservers->SetValue($i,'auto_number','pass',null); +// $servers->setValue('auto_number','pass',null); /* Enable anonymous bind login. */ -// $ldapservers->SetValue($i,'login','anon_bind',true); +// $servers->setValue('login','anon_bind',true); /* Use customized page with prefix when available. */ -# $ldapservers->SetValue($i,'custom','pages_prefix','custom_'); - -/* If you set this, then phpldapadmin will bind to LDAP with this user when - testing for unique attributes (as set in unique_attrs array). If you want to - enforce unique attributes, than this id should have full (readonly) access - to the attributes in question (the logged in user may not have enough access) -*/ -// $ldapservers->SetValue($i,'unique_attrs','dn',null); - -/* The password for the dn above */ -// $ldapservers->SetValue($i,'unique_attrs','pass',null); +# $servers->setValue('custom','pages_prefix','custom_'); /* If you set this, then only these DNs are allowed to log in. This array can contain individual users, groups or ldap search filter(s). Keep in mind that the user has not authenticated yet, so this will be an anonymous search to the LDAP server, so make your ACLs allow these searches to return results! */ -# $ldapservers->SetValue($i,'login','allowed_dns',array( +# $servers->setValue('login','allowed_dns',array( # 'uid=stran,ou=People,dc=example,dc=com', # '(&(gidNumber=811)(objectClass=groupOfNames))', # '(|(uidNumber=200)(uidNumber=201))', # 'cn=callcenter,ou=Group,dc=example,dc=com')); /* Set this if you dont want this LDAP server to show in the tree */ -// $ldapservers->SetValue($i,'appearance','visible',true); +// $servers->setValue('server','visible',true); /* This is the time out value in minutes for the server. After as many minutes of inactivity you will be automatically logged out. If not set, the default value will be ( session_cache_expire()-1 ) */ -# $ldapservers->SetValue($i,'login','timeout',30); +# $servers->setValue('login','timeout',30); /* Set this if you want phpldapadmin to perform rename operation on entry which has children. Certain servers are known to allow it, certain are not */ -// $ldapservers->SetValue($i,'server','branch_rename',false); - -/************************************************************************** - * If you want to configure additional LDAP servers, do so below. * - * Remove the commented lines and use this section as a template for all * - * your other LDAP servers. * - **************************************************************************/ - -/* -$i++; -$ldapservers->SetValue($i,'server','name','LDAP Server'); -$ldapservers->SetValue($i,'server','host','127.0.0.1'); -$ldapservers->SetValue($i,'server','port','389'); -$ldapservers->SetValue($i,'server','base',array('')); -$ldapservers->SetValue($i,'server','auth_type','cookie'); -$ldapservers->SetValue($i,'login','dn',''); -$ldapservers->SetValue($i,'login','pass',''); -$ldapservers->SetValue($i,'server','tls',false); -$ldapservers->SetValue($i,'server','low_bandwidth',false); -$ldapservers->SetValue($i,'appearance','password_hash','md5'); -$ldapservers->SetValue($i,'login','attr','dn'); -$ldapservers->SetValue($i,'login','string',null); -$ldapservers->SetValue($i,'login','class',null); -$ldapservers->SetValue($i,'server','read_only',false); -$ldapservers->SetValue($i,'appearance','show_create',true); -$ldapservers->SetValue($i,'auto_number','enable',true); -$ldapservers->SetValue($i,'auto_number','mechanism','search'); -$ldapservers->SetValue($i,'auto_number','search_base',null); -$ldapservers->SetValue($i,'auto_number','min','1000'); -$ldapservers->SetValue($i,'auto_number','dn',null); -$ldapservers->SetValue($i,'auto_number','pass',null); -$ldapservers->SetValue($i,'login','anon_bind',true); -$ldapservers->SetValue($i,'custom','pages_prefix','custom_'); -$ldapservers->SetValue($i,'unique_attrs','dn',null); -$ldapservers->SetValue($i,'unique_attrs','pass',null); - -# SASL auth -$ldapservers->SetValue($i,'server','sasl_auth',true); -$ldapservers->SetValue($i,'server','sasl_mech','PLAIN'); -$ldapservers->SetValue($i,'server','sasl_realm','EXAMPLE.COM'); -$ldapservers->SetValue($i,'server','sasl_authz_id',null); -$ldapservers->SetValue($i,'server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i'); -$ldapservers->SetValue($i,'server','sasl_authz_id_replacement','$1'); -$ldapservers->SetValue($i,'server','sasl_props',null); -*/ - -/*********************************************/ -/* User-friendly attribute translation */ -/*********************************************/ - -/* Use this array to map attribute names to user friendly names. For example, if - you don't want to see "facsimileTelephoneNumber" but rather "Fax". */ -$friendly_attrs = array(); - -$friendly_attrs['facsimileTelephoneNumber'] = 'Fax'; -$friendly_attrs['telephoneNumber'] = 'Phone'; -$friendly_attrs['uid'] = 'User Name'; - -/*********************************************/ -/* Support for attrs display order */ -/*********************************************/ - -/* Use this array if you want to have your attributes displayed in a specific - order. You can use default attribute names or their fridenly names. - For example, "sn" will be displayed right after "givenName". All the other - attributes that are not specified in this array will be displayed after in - alphabetical order. */ -# $attrs_display_order = array( -# 'givenName', -# 'sn', -# 'cn', -# 'displayName', -# 'uid', -# 'uidNumber', -# 'gidNumber', -# 'homeDirectory', -# 'mail', -# 'userPassword' -# ); - -/*********************************************/ -/* Hidden attributes */ -/*********************************************/ - -/* You may want to hide certain attributes from being displayed in the editor - screen. Do this by adding the desired attributes to this list (and uncomment - it). This only affects the editor screen. Attributes will still be visible in - the schema browser and elsewhere. An example is provided below: - NOTE: The user must be able to read the hidden_except_dn entry to be - excluded. */ -# $hidden_attrs = array( 'jpegPhoto', 'objectClass' ); -# $hidden_except_dn = "cn=PLA UnHide,ou=Groups,c=AU"; - -/* Hidden attributes in read-only mode. If undefined, it will be equal to - $hidden_attrs. */ -# $hidden_attrs_ro = array( -# 'objectClass','shadowWarning', 'shadowLastChange', 'shadowMax', -# 'shadowFlag', 'shadowInactive', 'shadowMin', 'shadowExpire'); - -/** **/ -/** Read-only attributes **/ -/** **/ - -/* You may want to phpLDAPadmin to display certain attributes as read only, - meaning that users will not be presented a form for modifying those - attributes, and they will not be allowed to be modified on the "back-end" - either. You may configure this list here: - NOTE: The user must be able to read the read_only_except_dn entry to be - excluded. */ -# $read_only_attrs = array( 'objectClass' ); -# $read_only_except_dn = "cn=PLA ReadWrite,ou=Groups,c=AU"; - -/* An example of how to specify multiple read-only attributes: */ -# $read_only_attrs = array( 'jpegPhoto', 'objectClass', 'someAttribute' ); +// $servers->setValue('server','branch_rename',false); + +/* If you set this, then phpldapadmin will show these attributes as + internal attributes, even if they are not defined in your schema. */ +// $servers->setValue('server','custom_sys_attrs',array('')); +# $servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime')); + +/* If you set this, then phpldapadmin will show these attributes on + objects, even if they are not defined in your schema. */ +// $servers->setValue('server','custom_attrs',array('')); +# $servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock')); + +/* These attributes will be forced to MAY attributes and become option in the + templates. If they are not defined in the templates, then they wont appear + as per normal template processing. You may want to do this becuase your LDAP + server may automatically calculate a default value. + In Fedora Directory Server using the DNA Plugin one could ignore uidNumber, + gidNumber and sambaSID. */ +// $servers->setValue('force_may','attrs',array('')); +# $servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID')); /*********************************************/ /* Unique attributes */ @@ -494,60 +482,70 @@ $friendly_attrs['uid'] = 'User Name'; /* You may want phpLDAPadmin to enforce some attributes to have unique values (ie: not belong to other entries in your tree. This (together with - unique_attrs['dn'] and unique_attrs['pass'] option will not let updates to - occur with other attributes have the same value. - NOTE: Currently the unique_attrs is NOT enforced when copying a dn. (Need to - present a user with the option of changing the unique attributes. */ -# $unique_attrs = array('uid','uidNumber','mail'); - -/*********************************************/ -/* Group attributes */ -/*********************************************/ - -/* Add "modify group members" link to the attribute. */ -// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid') - -/* Configure filter for member search. This only applies to "modify group members" feature */ -// $config->custom->modify_member['filter'] = '(objectclass=Person)'; + 'unique','dn' and 'unique','pass' option will not let updates to + occur with other attributes have the same value. */ +# $servers->setValue('unique','attrs',array('mail','uid','uidNumber')); -/* Attribute that is added to the group member attribute. */ -// $config->custom->modify_member['attr'] = 'dn'; - -/*********************************************/ -/* Predefined Queries (canned views) */ -/*********************************************/ - -/* To make searching easier, you may setup predefined queries below: */ -$q=0; -$queries = array(); - -/* The name that will appear in the simple search form */ -$queries[$q]['name'] = 'User List'; - -/* The base to search on */ -$queries[$q]['base'] = 'dc=example,dc=com'; - -/* The search scope (sub, base, one) */ -$queries[$q]['scope'] = 'sub'; +/* If you set this, then phpldapadmin will bind to LDAP with this user ID when + searching for attribute uniqueness. The idea is, this user id would have full + (readonly) access to your ldap directory (the logged in user may not), so + that you can be guaranteed to get a unique uidnumber for your directory. */ +// $servers->setValue('unique','dn',null); -/* The LDAP filter to use */ -$queries[$q]['filter'] = '(&(objectClass=posixAccount)(uid=*))'; +/* The password for the dn above. */ +// $servers->setValue('unique','pass',null); -/* The attributes to return */ -$queries[$q]['attributes'] = 'cn, uid, homeDirectory, telephonenumber, jpegphoto'; +/************************************************************************** + * If you want to configure additional LDAP servers, do so below. * + * Remove the commented lines and use this section as a template for all * + * your other LDAP servers. * + **************************************************************************/ -/* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */ -$q++; -$queries[$q]['name'] = 'Samba Users'; -$queries[$q]['base'] = 'dc=example,dc=com'; -$queries[$q]['scope'] = 'sub'; -$queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))'; -$queries[$q]['attributes'] = 'uid, smbHome, uidNumber'; +/* +$servers->newServer('ldap_pla'); +$servers->setValue('server','name','LDAP Server'); +$servers->setValue('server','host','127.0.0.1'); +$servers->setValue('server','port',389); +$servers->setValue('server','base',array('')); +$servers->setValue('login','auth_type','cookie'); +$servers->setValue('login','bind_id',''); +$servers->setValue('login','bind_pass',''); +$servers->setValue('server','tls',false); -$q++; -$queries[$q]['name'] = 'Samba Computers'; -$queries[$q]['base'] = 'dc=example,dc=com'; -$queries[$q]['scope'] = 'sub'; -$queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))'; -$queries[$q]['attributes'] = 'uid, homeDirectory'; +# SASL auth +$servers->setValue('server','sasl_auth',true); +$servers->setValue('server','sasl_mech','PLAIN'); +$servers->setValue('server','sasl_realm','EXAMPLE.COM'); +$servers->setValue('server','sasl_authz_id',null); +$servers->setValue('server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i'); +$servers->setValue('server','sasl_authz_id_replacement','$1'); +$servers->setValue('server','sasl_props',null); + +$servers->setValue('appearance','password_hash','md5'); +$servers->setValue('login','attr','dn'); +$servers->setValue('login','fallback_dn',false); +$servers->setValue('login','class',null); +$servers->setValue('server','read_only',false); +$servers->setValue('appearance','show_create',true); + +$servers->setValue('auto_number','enable',true); +$servers->setValue('auto_number','mechanism','search'); +$servers->setValue('auto_number','search_base',null); +$servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500)); +$servers->setValue('auto_number','dn',null); +$servers->setValue('auto_number','pass',null); + +$servers->setValue('login','anon_bind',true); +$servers->setValue('custom','pages_prefix','custom_'); +$servers->setValue('unique','attrs',array('mail','uid','uidNumber')); +$servers->setValue('unique','dn',null); +$servers->setValue('unique','pass',null); + +$servers->setValue('server','visible',true); +$servers->setValue('login','timeout',30); +$servers->setValue('server','branch_rename',false); +$servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime')); +$servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock')); +$servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID')); +*/ ?> diff --git a/etc/phpldapadmin/templates/creation/alias.xml b/etc/phpldapadmin/templates/creation/alias.xml index 64ab071..1cc7555 100644 --- a/etc/phpldapadmin/templates/creation/alias.xml +++ b/etc/phpldapadmin/templates/creation/alias.xml @@ -1,15 +1,16 @@ + diff --git a/etc/phpldapadmin/templates/creation/courierMailAccount.xml b/etc/phpldapadmin/templates/creation/courierMailAccount.xml index bc1a6c4..b7602ab 100644 --- a/etc/phpldapadmin/templates/creation/courierMailAccount.xml +++ b/etc/phpldapadmin/templates/creation/courierMailAccount.xml @@ -1,14 +1,15 @@ + diff --git a/etc/phpldapadmin/templates/creation/courierMailAlias.xml b/etc/phpldapadmin/templates/creation/courierMailAlias.xml index 906908f..9a53196 100644 --- a/etc/phpldapadmin/templates/creation/courierMailAlias.xml +++ b/etc/phpldapadmin/templates/creation/courierMailAlias.xml @@ -1,14 +1,15 @@ + diff --git a/etc/phpldapadmin/templates/creation/dNSDomain.xml b/etc/phpldapadmin/templates/creation/dNSDomain.xml index c2706ae..4a98054 100644 --- a/etc/phpldapadmin/templates/creation/dNSDomain.xml +++ b/etc/phpldapadmin/templates/creation/dNSDomain.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/example.xml b/etc/phpldapadmin/templates/creation/example.xml index 6fd7408..812b707 100644 --- a/etc/phpldapadmin/templates/creation/example.xml +++ b/etc/phpldapadmin/templates/creation/example.xml @@ -1,11 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/inetOrgPerson.xml b/etc/phpldapadmin/templates/creation/inetOrgPerson.xml index e82499f..6469221 100644 --- a/etc/phpldapadmin/templates/creation/inetOrgPerson.xml +++ b/etc/phpldapadmin/templates/creation/inetOrgPerson.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/kolabPerson.xml b/etc/phpldapadmin/templates/creation/kolabPerson.xml index 0429842..8be2e6b 100644 --- a/etc/phpldapadmin/templates/creation/kolabPerson.xml +++ b/etc/phpldapadmin/templates/creation/kolabPerson.xml @@ -1,14 +1,15 @@ + diff --git a/etc/phpldapadmin/templates/creation/mozillaOrgPerson.xml b/etc/phpldapadmin/templates/creation/mozillaOrgPerson.xml index fb05cda..dc39a73 100644 --- a/etc/phpldapadmin/templates/creation/mozillaOrgPerson.xml +++ b/etc/phpldapadmin/templates/creation/mozillaOrgPerson.xml @@ -1,139 +1,161 @@ + diff --git a/etc/phpldapadmin/templates/creation/organizationalRole.xml b/etc/phpldapadmin/templates/creation/organizationalRole.xml index 6696288..85e595a 100644 --- a/etc/phpldapadmin/templates/creation/organizationalRole.xml +++ b/etc/phpldapadmin/templates/creation/organizationalRole.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/ou.xml b/etc/phpldapadmin/templates/creation/ou.xml index e4ee85a..6e0f45a 100644 --- a/etc/phpldapadmin/templates/creation/ou.xml +++ b/etc/phpldapadmin/templates/creation/ou.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/posixAccount.xml b/etc/phpldapadmin/templates/creation/posixAccount.xml index 6ebee33..2931c1e 100644 --- a/etc/phpldapadmin/templates/creation/posixAccount.xml +++ b/etc/phpldapadmin/templates/creation/posixAccount.xml @@ -1,34 +1,35 @@ + diff --git a/etc/phpldapadmin/templates/creation/posixGroup.xml b/etc/phpldapadmin/templates/creation/posixGroup.xml index 381099e..2a2452d 100644 --- a/etc/phpldapadmin/templates/creation/posixGroup.xml +++ b/etc/phpldapadmin/templates/creation/posixGroup.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/sambaDomain.xml b/etc/phpldapadmin/templates/creation/sambaDomain.xml index 702a827..563828e 100644 --- a/etc/phpldapadmin/templates/creation/sambaDomain.xml +++ b/etc/phpldapadmin/templates/creation/sambaDomain.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/sambaGroupMapping.xml b/etc/phpldapadmin/templates/creation/sambaGroupMapping.xml index 8ca84cc..4feaee5 100644 --- a/etc/phpldapadmin/templates/creation/sambaGroupMapping.xml +++ b/etc/phpldapadmin/templates/creation/sambaGroupMapping.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/sambaMachine.xml b/etc/phpldapadmin/templates/creation/sambaMachine.xml index bc5d37f..fe5e5d3 100644 --- a/etc/phpldapadmin/templates/creation/sambaMachine.xml +++ b/etc/phpldapadmin/templates/creation/sambaMachine.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/sambaSamAccount.xml b/etc/phpldapadmin/templates/creation/sambaSamAccount.xml index 75d98db..d44fad8 100644 --- a/etc/phpldapadmin/templates/creation/sambaSamAccount.xml +++ b/etc/phpldapadmin/templates/creation/sambaSamAccount.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/sendmailMTAAliasObject.xml b/etc/phpldapadmin/templates/creation/sendmailMTAAliasObject.xml index 2ea98fb..86688b6 100644 --- a/etc/phpldapadmin/templates/creation/sendmailMTAAliasObject.xml +++ b/etc/phpldapadmin/templates/creation/sendmailMTAAliasObject.xml @@ -1,14 +1,15 @@ + diff --git a/etc/phpldapadmin/templates/creation/sendmailMTAClass.xml b/etc/phpldapadmin/templates/creation/sendmailMTAClass.xml index da546a7..9bbde8e 100644 --- a/etc/phpldapadmin/templates/creation/sendmailMTAClass.xml +++ b/etc/phpldapadmin/templates/creation/sendmailMTAClass.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/sendmailMTACluster.xml b/etc/phpldapadmin/templates/creation/sendmailMTACluster.xml index f6afa63..08bba5c 100644 --- a/etc/phpldapadmin/templates/creation/sendmailMTACluster.xml +++ b/etc/phpldapadmin/templates/creation/sendmailMTACluster.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/sendmailMTAMapObject.xml b/etc/phpldapadmin/templates/creation/sendmailMTAMapObject.xml index 6438dbf..5f4afd5 100644 --- a/etc/phpldapadmin/templates/creation/sendmailMTAMapObject.xml +++ b/etc/phpldapadmin/templates/creation/sendmailMTAMapObject.xml @@ -1,23 +1,28 @@ - + + + diff --git a/etc/phpldapadmin/templates/creation/sendmailVirtualDomain.xml b/etc/phpldapadmin/templates/creation/sendmailVirtualDomain.xml index 643e9d0..b2c1047 100644 --- a/etc/phpldapadmin/templates/creation/sendmailVirtualDomain.xml +++ b/etc/phpldapadmin/templates/creation/sendmailVirtualDomain.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/creation/sendmailVirtualUser.xml b/etc/phpldapadmin/templates/creation/sendmailVirtualUser.xml index 2dcba42..c046991 100644 --- a/etc/phpldapadmin/templates/creation/sendmailVirtualUser.xml +++ b/etc/phpldapadmin/templates/creation/sendmailVirtualUser.xml @@ -1,14 +1,19 @@ + + + diff --git a/etc/phpldapadmin/templates/creation/simpleSecurityObject.xml b/etc/phpldapadmin/templates/creation/simpleSecurityObject.xml index d2b4e4c..2cb2000 100644 --- a/etc/phpldapadmin/templates/creation/simpleSecurityObject.xml +++ b/etc/phpldapadmin/templates/creation/simpleSecurityObject.xml @@ -1,12 +1,14 @@ + diff --git a/etc/phpldapadmin/templates/modification/inetOrgPerson.xml b/etc/phpldapadmin/templates/modification/inetOrgPerson.xml index 385b472..7d53ccd 100644 --- a/etc/phpldapadmin/templates/modification/inetOrgPerson.xml +++ b/etc/phpldapadmin/templates/modification/inetOrgPerson.xml @@ -1,32 +1,40 @@ + diff --git a/etc/phpldapadmin/templates/template.dtd b/etc/phpldapadmin/templates/template.dtd index aae9e96..64ed786 100644 --- a/etc/phpldapadmin/templates/template.dtd +++ b/etc/phpldapadmin/templates/template.dtd @@ -1,11 +1,13 @@ - + Temporary URI for the DTD: http://phpldapadmin.sf.net/release/templates/template.dtd + Validate your templates here: http://www.xmlvalidation.com +========================================================================== +--> @@ -13,9 +15,8 @@ - + @@ -24,53 +25,47 @@ - + - + - - + + - - + + + + - - - - - - - - - + + - + + - - -- 2.30.2