ubuntu安装self-service-password

张翰音
2023-12-01

首先安装

vim /etc/apt/sources.list.d/ltb-project.list
deb [arch=amd64] https://ltb-project.org/debian/jessie jessie main
wget -O - https://ltb-project.org/wiki/lib/RPM-GPG-KEY-LTB-project | apt-key add -
apt-get update
apt-get install self-service-password

配置

cd  /usr/share/self-service-password/conf
配置如下两段
# LDAP
$ldap_url = "ldap://192.168.10.177:389";
$ldap_starttls = false;
$ldap_binddn = "cn=admin,dc=deepwise,dc=com";
$ldap_bindpw = "xxxx";
$ldap_base = "dc=deepwise,dc=com";
$ldap_login_attribute = "uid";
$ldap_fullname_attribute = "cn";
$ldap_filter = "(&(objectClass=person)($ldap_login_attribute={login}))";
$mail_from = "gerrit@deepwise.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 = 'smtp.mxhichina.com';
$mail_smtp_auth = true;
$mail_smtp_user = 'gerrit@deepwise.com';
$mail_smtp_pass = 'xxxx';
$mail_smtp_port = 587;
$mail_smtp_timeout = 30;
$mail_smtp_keepalive = false;
$mail_smtp_secure = 'tls';
$mail_smtp_autotls = true;
$mail_contenttype = 'text/plain';
$mail_wordwrap = 0;
$mail_charset = 'utf-8';
$mail_priority = 3;
$mail_newline = PHP_EOL;

安装基础软件

apt-get   install php-fpm apache2 php php-ldap php-mcrypt
apt-get install libapache2-mod-php
apt-get remove --purge libapache2-mod-php
apt-get install libapache2-mod-php
apt-get install php-mbstring
apt-get install php7.0-xml -y
apt-get    install  sendmail

apache2配置

cd /etc/apache2/sites-available
mv  000-default.conf  000-default.conf.bak
cp  self-service-password.conf  000-default.conf
/etc/init.d/apache2 restart 
 类似资料: