07-OpenLDAP密码审计
Posted cishi
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了07-OpenLDAP密码审计相关的知识,希望对你有一定的参考价值。
OpenLDAP密码审计
阅读视图
- 密码审计的作用
- 操作实践
1. 密码审计的作用
开启密码审计的功能主要用于记录OpenLDAP用户修改密码,以及密码审计。
2. 操作实践
开启密码审计模块并配置密码审计模块
[[email protected] cn=config]# cat >> /etc/openldap/slapd.conf << EOF moduleload auditlog.la overlay auditlog auditlog /var/log/slapd/audit.log EOF 删除旧配置库并重启 [[email protected] cn=config]# rm -rf /etc/openldap/slapd.d/* [[email protected] cn=config]# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d/ config file testing succeeded [[email protected] cn=config]# chown -R ldap.ldap /etc/openldap/slapd.d/ [[email protected] cn=config]# service slapd restart Stopping slapd: [ OK ] Starting slapd: [ OK ]
验证配置
在客户端修改用户密码
[[email protected] ~]# ssh [email protected] [email protected]‘s password: Permission denied, please try again. [email protected]‘s password: Last login: Wed May 30 16:16:44 2018 from localhost [[email protected] ~]$ passwd Changing password for user user1. Enter login(LDAP) password: New password: Retype new password: LDAP password information changed for user1 passwd: all authentication tokens updated successfully.
在服务端查看日志
[[email protected] slapd]# cat /var/log/slapd/audit.log # modify 1527675658 dc=gdy,dc=com uid=user1,ou=people,dc=gdy,dc=com IP=192.168.244.18:38656 conn=1009 dn: uid=user1,ou=people,dc=gdy,dc=com changetype: modify replace: userPassword userPassword:: e2NyeXB0fSQxJGI1aDVaVFVvJFhKQmczaWZFTW4zcWc4a0pvYnZuVDE= - replace: pwdChangedTime pwdChangedTime: 20180530102058Z
验证成功。
以上是关于07-OpenLDAP密码审计的主要内容,如果未能解决你的问题,请参考以下文章