php ldap 修改密码,搭建ldap自助修改密码系统--Self Service Password

服务安装:

安装依赖:yum install php70-ldap.x86_64 -y (版本尽量大于5.3,否则会提示更新php程序)

yum install httpd -y

安装Self Service Password:yum install https://ltb-project.org/rpm/6Server/noarch/self-service-password-1.1-1.el6.noarch.rpm

配置apache: /etc/httpd/conf.d/self-service-password.conf

NameVirtualHost *:80

ServerName ssp.xinniu.com

DocumentRoot /usr/share/self-service-password

DirectoryIndex index.php

AddDefaultCharset UTF-8

AllowOverride None

Allow from all

LogLevel warn

ErrorLog /var/log/httpd/ssp_error_log

CustomLog /var/log/httpd/ssp_access_log combined

配置Self Service Password,支持密码修改和邮件重置: vim /usr/share/self-service-password/conf/config.inc.php

这个文件配置项太多了,只写一下改动的

$ldap_url = "ldap://172.xx.xx.xx:389";

$ldap_starttls = false;

$ldap_binddn = "cn=admin,dc=xxxx,dc=com";

$ldap_bindpw = "****";

$ldap_base = "dc=xxxx,dc=com";

$ldap_login_attribute = "uid";

$ldap_fullname_attribute = "cn";

$ldap_filter = "(&(objectClass=person)($ldap_login_attribute={login}))";

$mail_from = "[email protected]";

$mail_from_name = "Self Service Password";

$mail_signature = "";

$notify_on_change = true;

https://github.com/PHPMailer/PHPMailer)

$mail_sendmailpath = ‘/usr/sbin/sendmail‘;

$mail_protocol = ‘smtp‘;

$mail_smtp_debug = 0;

$mail_debug_format = ‘html‘;

$mail_smtp_host = ‘localhost‘;

$mail_smtp_auth = true;

$mail_smtp_user = ‘[email protected]‘;

$mail_smtp_pass = ‘xxxxx;

$mail_smtp_port = 25;

keyphrase = "secret";

配完后service httpd start

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值