前言:
当前大家对“服务器密码重置怎么弄”大概比较重视,小伙伴们都想要分析一些“服务器密码重置怎么弄”的相关内容。那么小编同时在网摘上网罗了一些有关“服务器密码重置怎么弄””的相关资讯,希望朋友们能喜欢,你们快快来了解一下吧!参考网址:
一、安装openldap Self Service Password
vi /etc/apt/sources.list.d/ltb-project.list
内容
deb [arch=amd64 signed-by=/usr/share/keyrings/ltb-project.gpg] stable main
wget -O - | gpg --dearmor | sudo tee /usr/share/keyrings/ltb-project.gpg >/dev/nullapt updateapt install self-service-password
二、添加网站虚拟目录
安装程序在/etc/apache2/sites-available下创建了网站配置文件self-service-password.conf
vi /etc/apache2/sites-available/self-service-password.conf
把内容全部删除,填入:
Alias /ssp /usr/share/self-service-password/htdocs<Directory /usr/share/self-service-password/htdocs> AllowOverride None <IfVersion >= 2.3> Require all granted </IfVersion> <IfVersion < 2.3> Order Deny,Allow Allow from all </IfVersion> DirectoryIndex index.php AddDefaultCharset UTF-8</Directory>Alias /ssp/rest /usr/share/self-service-password/rest<Directory /usr/share/self-service-password/rest> AllowOverride None <IfVersion >= 2.3> Require all denied </IfVersion> <IfVersion < 2.3> Order Deny,Allow Deny from all </IfVersion> DirectoryIndex index.php AddDefaultCharset UTF-8</Directory>
然后发布网站,重新加载apache2
a2ensite self-service-passwordapachectl reload
现在就可以通过访问网页
三、修改配置文件
vi /etc/self-service-password/config.inc.php
ldap小节修改
# LDAP$ldap_url = "ldap://localhost";$ldap_starttls = false;$ldap_binddn = "cn=admin,dc=boue,dc=top"; #ldap管理账号$ldap_bindpw = 'password'; #密码// for GSSAPI authentication, comment out ldap_bind* and uncomment ldap_krb5ccname lines//$ldap_krb5ccname = "/path/to/krb5cc";$ldap_base = "dc=boue,dc=top"; #基础DN$ldap_login_attribute = "uid";$ldap_fullname_attribute = "cn";$ldap_filter = "(&(objectClass=person)($ldap_login_attribute={login}))";$ldap_use_exop_passwd = false;$ldap_use_ppolicy_control = false;$ldap_network_timeout = 10;
密码强度
# Local password policy# This is applied before directory password policy# Minimal length$pwd_min_length = 6;# Maximal length$pwd_max_length = 20;# Minimal lower characters$pwd_min_lower = 1;# Minimal upper characters$pwd_min_upper = 1;# Minimal digit characters$pwd_min_digit = 1;# Minimal special characters$pwd_min_special = 1;# Definition of special characters$pwd_special_chars = "^a-zA-Z0-9";
密码重置连接
# Reset URL (mandatory)$reset_url = ";;
邮件
## Mail# LDAP mail attribute$mail_attributes = array( "mail", "gosaMailAlternateAddress", "proxyAddresses" );# Get mail address directly from LDAP (only first mail entry)# and hide mail input field# default = false$mail_address_use_ldap = true; #重置密码邮件地址从ldap获取# Who the email should come from$mail_from = "laohe@boue.top";$mail_from_name = "Self Service Password";$mail_signature = "";# Notify users anytime their password is changed$notify_on_change = false;# PHPMailer configuration (see )$mail_sendmailpath = '/usr/sbin/sendmail';$mail_protocol = 'smtp';$mail_smtp_debug = 0;$mail_debug_format = 'error_log';$mail_smtp_host = 'mail.boue.top';$mail_smtp_auth = true;$mail_smtp_user = 'laohe@boue.top';$mail_smtp_pass = 'password'; $mail_smtp_port = 25;$mail_smtp_timeout = 30;$mail_smtp_keepalive = false;# $mail_smtp_secure = 'tls'; #我的邮件服务器smtp未加密,故注释掉# $mail_smtp_autotls = true;$mail_smtp_options = array();$mail_contenttype = 'text/plain';$mail_wordwrap = 0;$mail_charset = 'utf-8';$mail_priority = 3;
$keyphrase = "password";
四、界面
版权声明:
本站文章均来自互联网搜集,如有侵犯您的权益,请联系我们删除,谢谢。
标签: #服务器密码重置怎么弄