首页 > 系统相关 >Ubuntu 22.04 使用self-service-password搭建自主修改密码平台

Ubuntu 22.04 使用self-service-password搭建自主修改密码平台

时间:2024-05-23 14:52:13浏览次数:31  
标签:service self Ubuntu smtp ldap mail password

Ubuntu系统安装准备

正式安装

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;

  • 邮件配置只三个参考具体需要测试。

参考
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

标签:service,self,Ubuntu,smtp,ldap,mail,password
From: https://www.cnblogs.com/autopwn/p/18208481

相关文章

  • windows上使用wsl的ubuntu部署stirling-pdf
    由于要部署stirling-pdf需要docker环境,所以需要使用ubuntu系统,那么在win10/win11上最方便的方式就是使用wsl安装ubuntu然后再wsl上的ubuntu上进行部署,接下来就是整个步骤在windows上使用wsl安装ubuntu,在powershell上使用wsl--install命令就可以默认安装ubuntu了,方便快捷登录ub......
  • skynet.newservice简介:服务的启动
    skynet是一个轻量级的游戏服务器框架。简介在skynet的体系中,服务是一个基础概念。通常,我们使用skynet.newservice来启动一个snlua服务。那么,当我们写下localaddr=skynet.newservice("test")这行代码时,系统是怎么运作的呢?思考一下这些问题:调用skynet.newservice会不会发......
  • Ubuntu 解决 Too many open files 问题
    #查看限制结果ulimit-a#修改配置#删除最后一行echo-e"#add_config"|sudotee-a/etc/security/limits.conf#加上文本echo-e"\n"|sudotee-a/etc/security/limits.confecho-e"mzc\tsoft\tnproc\t204800"|sudotee-a......
  • Ubuntu 22.04.4 深度学习环境配置
    显卡为NVIDIA4090D 显卡驱动安装成功后,输入以下命令,查看驱动支持最高的CUDA版本。nvidia-smi一、CUDA安装(1)官网下载对应CUDA(NvidiaCUDADownload / CUDAToolkitArchive|NVIDIADeveloper)以CUDA11.8为例(师兄用12.2也未冲突)  (2)驱动安装开网上推荐安装runfil......
  • ROS学习篇1安装(Ubuntu18.04 Bionic +ROS Melodic)
    设置sources.listsudosh-c'echo"debhttp://packages.ros.org/ros/ubuntu$(lsb_release-sc)main">/etc/apt/sources.list.d/ros-latest.list'sudoapt-keyadv--keyserver'hkp://keyserver.ubuntu.com:80'--recv-keyC1CF6E31E6......
  • 【ubuntu】22.04安装Redis Insight及AnotherRedisDesktopManager
    一、RedisInsight1、官网下载https://redis.io/insight/#insight-form  2、安装sudodpkg-iRedisInsight-linux-amd64.deb 3、运行  二、AnotherRedisDesktopManager1、官网下载https://github.com/qishibo/AnotherRedisDesktopManager/releases/tag/v1.......
  • ubuntu(乌班图):阿里云安装源sources.list内容+附件
    #debcdrom:[Ubuntu22.04.4LTS_JammyJellyfish_-Releaseamd64(20240220)]/jammymainrestricted#Seehttp://help.ubuntu.com/community/UpgradeNotesforhowtoupgradeto#newerversionsofthedistribution.debhttp://mirrors.aliyun.com/ubuntu/jammy......
  • RK3308 SDK 编译 --- ubuntu 22
    ./build.shbuildroot编译问题controller-enumtypes.c:6:1:error:stray'\'inprogram\#include"gstinterpolationcontrolsource.h"^controller-enumtypes.c:6:2:error:stray'#'inprogram\#include"gstinterpolationco......
  • ASP.NET Web应用程序创建的webservice接口如何在postman里测试调用
    ASMX中的方法 启动项目浏览器展示的页面如下 点击ReceiveOrder,展示该方法的请求和响应示例 在postman中输入以下信息 选择raw--xml,粘贴浏览器中的SOAP1.1或者SOAP1.2中的请求示例 点击Send按钮发生请求 SOAP1.1以下是SOAP1.1请求和响应示例。所显示的占位......
  • Ubuntu上使用QT creator运行cuda程序 转载的文章
    突发奇想想尝试一下QT界面中使用CUDA加速过的程序,然后查了一下资料,总结一下有以下几点吧1、CUDA配置全部放在.pro文件中2、main.cpp为主函数使用g++编译3、kernel.cu为核函数使用nvcc编译不多说上代码以下为main.cpp代码   #include<QtCore/QCoreApplication>       ......