티스토리 뷰
우분투에서 LDAP을 설치 하고, 기본 설정을 처리하는 방법을 알아보겠습니다.
slapd는 stand-alone ldap로 ldap 서버이고, ldap-utils는 ldap 쿼리 명령 실행을 위한 도구입니다.
$ sudo apt-get -y install slapd ldap-utils
LDAP 설치 중 다음과 같은 암호 설정화면이 나오는데, 이는 관리자용 암호 이기 때문에 잘 기억해 두어야 합니다.

암호를 입력하고 나면 설치가 완료 됩니다. 설치가 완료되면 다음 명령어를 입력하여 ldap 설정을 진행합니다.
sudo dpkg-reconfigure slapd
설정을 진행하기 위해서 No 를 선택합니다.

도메인 네임(DN)을 입력하는 창이 나오면 적절한 이름을 입력합니다. (ex: example.com)
그 다음 조직명을 입력하는 창이 나오면 적당한 이름을 입력합니다.

DB는 MDB를 선택하고, 다음은 모두 기본 설정으로 엔터를 입력해 주면 설정이 완료됩니다.

이제 모든 설정이 완료 되고, 현재 설정 상태를 확인합니다.
$ sudo slapcat
dn: dc=hello,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: example
dc: hello
structuralObjectClass: organization
entryUUID: 6ccfa1b0-72a5-103b-92e0-7f2f687e4efb
creatorsName: cn=admin,dc=hello,dc=com
createTimestamp: 20210706125712Z
entryCSN: 20210706125712.164479Z#000000#000#000000
modifiersName: cn=admin,dc=hello,dc=com
modifyTimestamp: 20210706125712Z
dn: cn=admin,dc=hello,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword:: e1NTSEF9OVhsNFRJeWNSdmZabWhxSkRBNndmMlY3NVFiUzRjZ1Y=
structuralObjectClass: organizationalRole
entryUUID: 6cd058f8-72a5-103b-92e1-7f2f687e4efb
creatorsName: cn=admin,dc=hello,dc=com
createTimestamp: 20210706125712Z
entryCSN: 20210706125712.169254Z#000000#000#000000
modifiersName: cn=admin,dc=hello,dc=com
modifyTimestamp: 20210706125712Z
여기까지 진행하면 LDAP을 설정했습니다.
LDAP 조회
LDAP이 동작하는지 확인하기 위해서 데이터 조회를 진행합니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -h: LDAP의 호스트 | |
# -x: 심플 인증. 389 포트 이용. 암호화 사용하지 않음 | |
# -D: binddn. 조회에 사용할 사용자. admin은 설치할 때 입력한 관리자 | |
# -w: 관리자 암호 | |
# -b: searchbase. 조회를 시작할 위치 | |
$ ldapsearch -h localhost -x -D "cn=admin,dc=hello,dc=com" -w '암호' -b "cn=com,dc=hadoop" | |
# extended LDIF | |
# | |
# LDAPv3 | |
# base <cn=com,dc=hadoop> with scope subtree | |
# filter: (objectclass=*) | |
# requesting: ALL | |
# | |
# search result | |
search: 2 | |
result: 32 No such object | |
# numResponses: 1 |
반응형
'빅데이터' 카테고리의 다른 글
[avro] python avro api 에서 The datum XX is not an example of the schema 오류 (0) | 2021.07.13 |
---|---|
[avro] 파이썬을 이용한 avro 예제 (0) | 2021.07.07 |
[grafana] 우분투(ubuntu)에 그라파나(grafana) 설치 (0) | 2021.04.12 |
[Helm] error validation "" 오류 해결방법 (0) | 2020.10.07 |
[빅데이터][스크랩] 네이버의 하둡 클러스터 운영 주의 사항 (0) | 2020.03.24 |
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- SPARK
- java
- AWS
- hbase
- nodejs
- ubuntu
- error
- bash
- 하이브
- 정올
- oozie
- S3
- Hadoop
- 다이나믹
- 오류
- 백준
- emr
- 파이썬
- Linux
- Tez
- airflow
- 하둡
- mysql
- yarn
- SQL
- build
- HDFS
- Python
- HIVE
- 알고리즘
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함