1: # this many questions will be included in the page forms # this many questions must be set at a time # user must answer this many correctly to reset a password # $multiple_answers must be true # at least this many possible questions must be available (there are only 2 questions built-in) $questions_count = 1; # Should the user be able to select registered question(s) by entering only the login? $question_populate_enable = false; ## Token # Use tokens? # true (default) # false $use_tokens = true; # Crypt tokens? # true (default) # false $crypt_tokens = true; # Token lifetime in seconds $token_lifetime = "3600"; ## Mail # LDAP mail attribute $mail_attribute = "mail"; # Get mail address directly from LDAP (only first mail entry) # and hide mail input field # default = false $mail_address_use_ldap = false; # Who the email should come from $mail_from = "admin@example.com"; $mail_from_name = "Self Service Password"; $mail_signature = ""; # Notify users anytime their password is changed $notify_on_change = false; # PHPMailer configuration (see https://github.com/PHPMailer/PHPMailer) $mail_sendmailpath = '/usr/sbin/sendmail'; $mail_protocol = 'smtp'; $mail_smtp_debug = 0; $mail_debug_format = 'error_log'; $mail_smtp_host = 'localhost'; $mail_smtp_auth = false; $mail_smtp_user = ''; $mail_smtp_pass = ''; $mail_smtp_port = 25; $mail_smtp_timeout = 30; $mail_smtp_keepalive = false; $mail_smtp_secure = 'tls'; $mail_smtp_autotls = true; $mail_smtp_options = array(); $mail_contenttype = 'text/plain'; $mail_wordwrap = 0; $mail_charset = 'utf-8'; $mail_priority = 3; ## SMS # Use sms $use_sms = true; # SMS method (mail, api) $sms_method = "mail"; $sms_api_lib = "lib/smsapi.inc.php"; # GSM number attribute $sms_attribute = "mobile"; # Partially hide number $sms_partially_hide_number = true; # Send SMS mail to address $smsmailto = "{sms_attribute}@service.provider.com"; # Subject when sending email to SMTP to SMS provider $smsmail_subject = "Provider code"; # Message $sms_message = "{smsresetmessage} {smstoken}"; # Remove non digit characters from GSM number $sms_sanitize_number = false; # Truncate GSM number $sms_truncate_number = false; $sms_truncate_number_length = 10; # SMS token length $sms_token_length = 6; # Max attempts allowed for SMS token $max_attempts = 3; # Encryption, decryption keyphrase, required if $use_tokens = true and $crypt_tokens = true, or $use_sms, or $crypt_answer # Please change it to anything long, random and complicated, you do not have to remember it # Changing it will also invalidate all previous tokens and SMS codes $keyphrase = "secret"; # Reset URL (if behind a reverse proxy) #$reset_url = $_SERVER['HTTP_X_FORWARDED_PROTO'] . "://" . $_SERVER['HTTP_X_FORWARDED_HOST'] . $_SERVER['SCRIPT_NAME']; # Display help messages $show_help = true; # Default language $lang = "en"; # List of authorized languages. If empty, all language are allowed. # If not empty and the user's browser language setting is not in that list, language from $lang will be used. $allowed_lang = array(); # Display menu on top $show_menu = true; # Logo $logo = "images/ltb-logo.png"; # Background image $background_image = "images/unsplash-space.jpeg"; $custom_css = ""; $display_footer = true; # Where to log password resets - Make sure apache has write permission # By default, they are logged in Apache log #$reset_request_log = "/var/log/self-service-password"; # Invalid characters in login # Set at least "*()&|" to prevent LDAP injection # If empty, only alphanumeric characters are accepted $login_forbidden_chars = "*()&|"; ## Captcha $use_captcha = false; ## Default action # change # sendtoken # sendsms $default_action = "change"; ## Rest API $use_restapi = false; ## Extra messages # They can also be defined in lang/ files #$messages['passwordchangedextramessage'] = NULL; #$messages['changehelpextramessage'] = NULL; ## Pre Hook # Launch a prehook script before changing password. # Script should return with 0, to allow password change. # Any other exit code would abort password modification #$prehook = "/usr/share/self-service-password/prehook.sh"; # Display prehook error #$display_prehook_error = true; # Encode passwords sent to prehook script as base64. This will prevent alteration of the passwords if set to true. # To read the actual password in the prehook script, use a base64_decode function/tool #$prehook_password_encodebase64 = false; # Ignore prehook error. This will allow to change password even if prehook script fails. #$ignore_prehook_error = true; ## Post Hook # Launch a posthook script after successful password change #$posthook = "/usr/share/self-service-password/posthook.sh"; # Display posthook error #$display_posthook_error = true; # Encode passwords sent to posthook script as base64. This will prevent alteration of the passwords if set to true. # To read the actual password in the posthook script, use a base64_decode function/tool #$posthook_password_encodebase64 = false; # Force setlocale if your default PHP configuration is not correct #setlocale(LC_CTYPE, "en_US.UTF-8"); # Hide some messages to not disclose sensitive information # These messages will be replaced by badcredentials error #$obscure_failure_messages = array("mailnomatch"); # HTTP Header name that may hold a login to preset in forms #$header_name_preset_login="Auth-User"; # The name of an HTTP Header that may hold a reference to an extra config file to include. #$header_name_extra_config="SSP-Extra-Config"; # Cache directory #$smarty_compile_dir = "/var/cache/self-service-password/templates_c"; #$smarty_cache_dir = "/var/cache/self-service-password/cache"; # Allow to override current settings with local configuration if (file_exists (__DIR__ . '/config.inc.local.php')) { require __DIR__ . '/config.inc.local.php'; } # Smarty if (!defined("SMARTY")) { define("SMARTY", "/usr/share/php/smarty3/Smarty.class.php"); } # Set preset login from HTTP header $header_name_preset_login $presetLogin = ""; if (isset($header_name_preset_login)) { $presetLoginKey = "HTTP_".strtoupper(str_replace('-','_',$header_name_preset_login)); if (array_key_exists($presetLoginKey, $_SERVER)) { $presetLogin = preg_replace("/[^a-zA-Z0-9-_@\.]+/", "", filter_var($_SERVER[$presetLoginKey], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH)); } } # Allow to override current settings with an extra configuration file, whose reference is passed in HTTP_HEADER $header_name_extra_config if (isset($header_name_extra_config)) { $extraConfigKey = "HTTP_".strtoupper(str_replace('-','_',$header_name_extra_config)); if (array_key_exists($extraConfigKey, $_SERVER)) { $extraConfig = preg_replace("/[^a-zA-Z0-9-_]+/", "", filter_var($_SERVER[$extraConfigKey], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH)); if (strlen($extraConfig) > 0 && file_exists (__DIR__ . "/config.inc.".$extraConfig.".php")) { require __DIR__ . "/config.inc.".$extraConfig.".php"; } } }