Ubuntu系统安装准备
- 正常操作是安装成功系统,安装的时候设置好静态密码。
- 参考官方文档:https://self-service-password.readthedocs.io/en/stable/installation.html
- 根据文档提示安装会报错,网上查了些资料需要按照如下步骤安装依赖。
正式安装
vi /etc/apt/sources.list.d/ltb-project.list
deb [arch=amd64 signed-by=/usr/share/keyrings/ltb-project.gpg] https://ltb-project.org/debian/stable stable main
wget -O - https://ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project | gpg --dearmor | sudo tee /usr/share/keyrings/ltb-project.gpg >/dev/null
sudo apt --fix-broken install
sudo apt update
sudo apt install php php-gd php-ldap php-mbstring
sudo apt install php php-cli php-cgi php-common
sudo apt install self-service-password smarty3
配置参数
- 按照上述步骤基本一路命令敲击下来,self-service-password就安装成功了。
- 首先是配置apache,将其更改为self-service-password相关的目录。
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
- 配置self-service-password参数
cd /etc/self-service-password/
vim config.inc.php
配置如下两段
# LDAP
$ldap_url = "ldap://10.10.200.180:389";
$ldap_starttls = false;
$ldap_binddn = "cn=admin,dc=vantest,dc=com";
$ldap_bindpw = "admin@111";
$ldap_base = "dc=vantest,dc=com";
$ldap_login_attribute = "uid";
$ldap_fullname_attribute = "cn";
$ldap_filter = "(&(objectClass=person)($ldap_login_attribute={login}))";
#---------------------------------
$mail_address_use_ldap = true;
$mail_from = "[email protected]";
$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 = '[email protected]';
$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;
- 邮件配置只三个参考具体需要测试。
标签:service,self,Ubuntu,smtp,ldap,mail,password From: https://www.cnblogs.com/autopwn/p/18208481参考
https://kifarunix.com/setup-ldap-self-service-password-tool-on-centos-8/
http://www.jouvinio.net/wiki/index.php/Configuration_LDAP_Self_Service_Password
https://self-service-password.readthedocs.io/en/stable/config_apache.html
https://cn.linux-console.net/?p=3446