java修改ldap用户密码_LDAP 用户更改自己的密码
LDAP中采用了ACL的权限控制。
在/etc/openldap/slapd.conf文件中:#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include/etc/openldap/schema/corba.schema
include/etc/openldap/schema/core.schema
include/etc/openldap/schema/cosine.schema
include/etc/openldap/schema/duaconf.schema
include/etc/openldap/schema/dyngroup.schema
include/etc/openldap/schema/inetorgperson.schema
include/etc/openldap/schema/java.schema
include/etc/openldap/schema/misc.schema
include/etc/openldap/schema/nis.schema
include/etc/openldap/schema/openldap.schema
include/etc/openldap/schema/ppolicy.schema
include/etc/openldap/schema/collective.schema
# Allow LDAPv2 client connections. This is NOT the default.
allow bind_v2
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referralldap://root.openldap.org
pidfile/var/run/openldap/slapd.pid
argsfile/var/run/openldap/slapd.args
# Load dynamic backend modules
# - modulepath is architecture dependent value (32/64-bit system)
# - back_sql.la overlay requires openldap-server-sql package
# - dyngroup.la and dynlist.la cannot be used at the same time
#modulepath /usr/lib/openldap
# modulepath /usr/lib64/openldap
# moduleload accesslog.la
# moduleload auditlog.la
# moduleload back_sql.la
# moduleload chain.la
# moduleload collect.la
# moduleload constraint.la
# moduleload dds.la
# moduleload deref.la
# moduleload dyngroup.la
# moduleload dynlist.la
# moduleload memberof.la
# moduleload pbind.la
# moduleload pcache.la
# moduleload ppolicy.la
# moduleload refint.la
# moduleload retcode.la
# moduleload rwm.la
# moduleload seqmod.la
# moduleload smbk5pwd.la
# moduleload sssvlv.la
# moduleload syncprov.la
# moduleload translucent.la
# moduleload unique.la
# moduleload valsort.la
# The next three lines allow use of TLS for encrypting connections using a
# dummy test certificate which you can generate by running
# /usr/libexec/openldap/generate-server-cert.sh. Your client software may balk
# at self-signed certificates, however.
TLSCACertificatePath /etc/openldap/certs
TLSCertificateFile "\"OpenLDAP Server\""
TLSCertificateKeyFile /etc/openldap/certs/password
# Sample security restrictions
#Require integrity protection (prevent hijacking)
#Require 112-bit (3DES or better) encryption for updates
#Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:
#Root DSE: allow anyone to read it
#Subschema (sub)entry DSE: allow anyone to read it
#Other DSEs:
#Allow self write access
#Allow authenticated users read access
#Allow anonymous users to authenticate
#Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
#下面的控制权限的语句。
access to dn.subtree="ou=People,dc=bawo,dc=cn" attrs=userPassword,shadowLastChange
by dn="cn=admin,dc=bawo,dc=cn" write
by self write
by anonymous auth
by * read
#access to attrs=uid,uidNumber,gidNumber,memberUid
#by * read
# if no access controls are present, the default policy
#
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
# enable on-the-fly configuration (cn=config)
database config
access to *
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
by * none
# enable server status monitoring (cn=monitor)
database monitor
access to *
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read
by dn.exact="cn=admin,dc=bawo,dc=cn" read
by * none
#######################################################################
# database definitions
#######################################################################
databasebdb
suffix"dc=XX,dc=cn"
checkpoint1024 15
rootdn"cn=admin,dc=XX,dc=cn"
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw123456
# rootpw{crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory/var/lib/ldap
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
添加完上面的语句后,然后需要更新这个配置文件到ldap的服务中。service slapd stop
rm -rf /etc/openldap/slapd.d/
chown -R ldap:ldap /var/lib/ldap
chown -R ldap:ldap /etc/openldap/
#测试并生成配置文件:
slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
#返回config file testing succeeded,则配置成功。
chown -R ldap:ldap /etc/openldap/slapd.d
service slapd restart
完成之后,就把LDAP的权限设置成功了。用户可以在phpLDAPadmin中自行修改自己的密码了。
其他设置项目可以自行探索。
其他权限设置参考
java修改ldap用户密码_LDAP 用户更改自己的密码相关推荐
- Mac密码该如何更改,Mac密码更改教程
Apple的iCloud钥匙串是一项默认服务,可在所有Apple设备上保存并同步您的帐户凭据,Wi-Fi密码等. iCloud钥匙串在Mac和其他Apple设备上如何工作? iCloud钥匙串与iOS ...
- mac设置mysql root密码_mac如何更改mysql root密码 Mac平台重新设置MySQL的root密码
类型:Mac编程软件大小:4.4M语言:中文 评分:10.0 标签: 立即下载 相信很多小伙伴都不会如何更改MySQL的root密码,今天西西小编就mac端的MySQL密码重置整理了相关的文章,希望能 ...
- mysql刚开始的密码是什么意思,mysql的密码(mysql初始密码是什么)
mysql的密码(mysql初始密码是什么) 2020-05-15 12:10:07 共10个回答 下载了mysql最新版本,安装的过程中,发现了很多新特性1.data目录不见了在进行my-defau ...
- 用java进行LDAP用户登陆(用户认证)及修改密码
为什么80%的码农都做不了架构师?>>> 一.用户认证 public String execute(){Hashtable env = new Hashtable();Stri ...
- linux 修改ldap密码,centos – ldap强制用户更改密码
我正在使用CentOS-ds(基于Redhat-DS和389目录服务器). 我有LDAP设置,并努力验证用户(和Sudo,这是一个方便的功能!).甚至passwd也很好地改变了存储在Ldap中的密码. ...
- java修改AD域用户密码使用SSL连接方式
正常情况下,JAVA修改AD域用户属性,只能修改一些普通属性, 如果要修改AD域用户密码和userAccountControl属性就得使用SSL连接的方式修改, SSL连接的方式需要操作以下步骤: 1 ...
- java修改用户密码全代码
java实现修改密码 前段时间一直在写东西,本来不想把用户这块的东西放出来,想了想,还是弄一个修改密码功能实现一下,首先介绍一下我这个项目,他有session等验证,所以搞起来得和正式的项目一样得实现 ...
- bt5更改mysql密码_修改PostgreSQL数据库的默认用户postgres的密码
有时候,忘记了postgresql 安装时默认用户postgres 的密码,怎么办呢? linux shell命令下面输入: sudo -u postgres psql (这样就可以直接登录进pos ...
- 查看计算机用户修改密码时间,使用ldap语句查询某时间后没改密码的用户
经常使用Active Directory用户和计算机控制台的我们会发现,在左侧控制台树的最上面有一个"保存的查询",通过新建查询可以看到可以通过图形界面创建一些简单的查询操作. 那 ...
最新文章
- 代数系统思维导图_线性代数思维导图专题
- burpsuite配置指南
- html路由怎样做div,路由传参练习.html
- CSS3 box-orient box-direction box-align box-flex box-pack
- 批量修改nginx配置文件
- 【Linux】一步一步学Linux——read命令(220)
- 【C++鼠标键盘操作】自动下载CSDN博客文章到PDF
- mysql characteristic_MySQL存储过程定义中的特性(characteristic)的含义
- node express+socket.io实现聊天室
- mysql 用数据库存储视频文件_如何用SQL数据库存放视频
- 压力传感器常用的3种检测方法
- 隐私信息检索(隐匿查询)
- 学海无涯!我总结了所有面试题,含答案解析
- ssms远程服务器地址,SSMS如何远程到SQL SERVER?
- OpenJ_Bailian - 2692 假币问题
- CentOS7根目录磁盘扩容(/dev/mapper/centos-root 空间不足)
- .net 在图片上写字
- AI内容生成工具列表,可用于生成 AI 内容的工具列表。具有图像生成、文本生成等功能。
- VSCode格式化XML
- iOS UIFont 字体大全
热门文章
- jQuery 遍历:思路总结,项目场景中如何处理/控制获取的 each 遍历次数?
- 目标检测第1步:如何在Windows 10下安装MiniConda?
- c语言jt808协议库,平台如何应答——关于JT/T808协议
- java9 堆外内存_java堆外内存泄漏排查
- 阿里云rds for mysql平台介绍_阿里云RDS for MySQL 快速入门——笔记
- python使用的编辑器_我用过的最好的python编辑器PyScripter
- 华为p10和p10plus区别_华为p10和p10plus哪个好 华为p10与p10plus区别对比【图文】
- ip地址转换pta题目_PTA「实验2-3-5 输出华氏-摄氏温度转换表」
- 常用的loss函数,以及在训练中的使用
- Angular gitlab持续集成之runner配置