728x90
반응형
0. Logging 설정 됐는지 확인
ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config -s base|grep -i LOG
# olcLogLevel: -1 가 나와야 함
1. Logging 설정을 위한 ldif 파일 생성
vi /root/logging.ldif
# 아래 내용 입력
dn: cn=config
replace: olcLogLevel
olcLogLevel: -1
2. 생성한 ldif 파일로 적용
ldapmodify -Y EXTERNAL -H ldapi:/// -f /root/logging.ldif
3. 적용 확인
ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config -s base|grep -i LOG
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
olcLogLevel: -1
4. 서비스 리스타트
systemctl restart slapd
5. syslog로 등록
vi /etc/rsyslog.conf
# 아래 추가
local4.* -/var/log/slapd.log
# syslog 서비스 재시작
systemctl restart rsyslog
6. Logrotate 설정
vi /etc/logrotate.d/syslog
# 해당 라인 추가
/var/log/slapd.log
7. Logging Level List
728x90
Level | Keyword | Description |
-1 | any | enable all debugging |
0 | no debugging | |
1 | (0x1 trace) | trace function calls |
2 | (0x2 packets) | debug packet handling |
4 | (0x4 args) | heavy trace debugging |
8 | (0x8 conns) | connection management |
16 | (0x10 BER) | print out packets sent and received |
32 | (0x20 filter) | search filter processing |
64 | (0x40 config) | configuration processing |
128 | (0x80 ACL) | access control list processing |
256 | (0x100 stats) | stats log connections/operations/results |
512 | (0x200 stats2) | stats log entries sent |
1024 | (0x400 shell) | print communication with shell backends |
2048 | (0x800 parse) | print entry parsing debugging |
16384 | (0x4000 sync) | syncrepl consumer processing |
32768 | (0x8000 none) | only messages that get logged whatever log level is set |
728x90
300x250
'IT > OpenLDAP' 카테고리의 다른 글
실사용에 유용한 ldap command 사용방법 (ldapadd, ldapmodify, ldappassword 등등) (0) | 2022.02.17 |
---|---|
LDAP 사용자 자동 등록 처리 (0) | 2022.02.15 |
(최신) Amazon Linux 2에서 OpenLDAP 구성 (with SAMBA) (0) | 2022.01.14 |
LDAP Account Manager의 설정 (0) | 2021.07.30 |
OpenLDAP memberOf overlay (0) | 2021.07.30 |