위지원의 데이터 일기 🐈
Home
  • 분류 전체보기 (563)
    • ✎ 2025년 (4)
    • 2024년 (16)
    • 2023년 (6)
    • 2022년 (35)
      • Developement (22)
      • Error (9)
    • 2021년 (68)
      • ERROR (9)
      • 알고리즘 (11)
      • 개발공부 (21)
      • Data (15)
      • 21.下 (12)
    • 2020년 (164)
      • 코테 (84)
      • Development (29)
      • 정처기 (41)
    • 2019년 (27)
    • 2018년 (89)
      • English Speaking (8)
      • Error (12)
      • C, Java, FileSystem (13)
      • DataBase (15)
      • Java (2)
      • 지식 (16)
      • Go (3)
      • spark (9)
      • 영어 (5)
      • 알고리즘 (6)
    • 2017년 (143)
      • Error (17)
      • machine learning (16)
      • Spark (20)
      • Database (19)
      • Python (17)
      • Spring (9)
      • etc. (10)
      • 백준 (5)
      • Google Platform (12)
      • web Development (7)
      • Docker (3)
      • Linux (8)
Home
  • 분류 전체보기 (563)
    • ✎ 2025년 (4)
    • 2024년 (16)
    • 2023년 (6)
    • 2022년 (35)
      • Developement (22)
      • Error (9)
    • 2021년 (68)
      • ERROR (9)
      • 알고리즘 (11)
      • 개발공부 (21)
      • Data (15)
      • 21.下 (12)
    • 2020년 (164)
      • 코테 (84)
      • Development (29)
      • 정처기 (41)
    • 2019년 (27)
    • 2018년 (89)
      • English Speaking (8)
      • Error (12)
      • C, Java, FileSystem (13)
      • DataBase (15)
      • Java (2)
      • 지식 (16)
      • Go (3)
      • spark (9)
      • 영어 (5)
      • 알고리즘 (6)
    • 2017년 (143)
      • Error (17)
      • machine learning (16)
      • Spark (20)
      • Database (19)
      • Python (17)
      • Spring (9)
      • etc. (10)
      • 백준 (5)
      • Google Platform (12)
      • web Development (7)
      • Docker (3)
      • Linux (8)
블로그 내 검색
포트폴리오

위지원의 데이터 일기 🐈

데이터를 사랑하고 궁금해하는 기록쟁이입니다! 😉 Super Data Girl이 되는 그날까지🏃‍♀️ 화이팅!

  • 🖥 깃블로그
  • 🌍 위키원
  • 📑 내맘대로 스크랩
  • 💌 메일
  • 2022년/Developement

    [Network] LDAP Ubuntu <-> Windows LDAP Manager

    2022. 1. 3. 14:33

    by. 위지원

    LDAP는 데이터를 중앙관리 할 때 유용하다. 권한관리라던지, 사용자 정보 관리 등..

     

    openLDAP는 LDAP를 구현하는 오픈소스 중 자주 쓰이는 오픈소스라고 한다. 이를 기반으로 간단하게 구현해보자.

     

    OpenLDAP, Main Page

    The suite includes: lloadd - stand-alone LDAP Load Balancer Daemon (server or slapd module) slapd - stand-alone LDAP daemon (server) libraries implementing the LDAP protocol, and utilities, tools, and sample clients. Also available from the OpenLDAP Projec

    www.openldap.org

     

    ~$ sudo apt install slapd ldap-utils
    ~$ service --status-all
    
    # 서비스 확인
    ~$ sudo service slapd start
    ~$ sudo vi ldaprootpasswd.ldif
    
    # 방화벽 요청 허용
    ~$ sudo ufw allow ldap
    
    # 패스워드 생성
    ~$ slappasswd
    
    # 아래 내용 작성
    dn: olcDatabase={0}config,cn=config
    changetype: modify
    add: olcRootPW
    olcRootPW: {SSHA}PASSWORD_CREATED
    
    ~$ sudo ldapadd -Y EXTERNAL -H ldapi:/// -f ldaprootpasswd.ldif
    
    # 포트 오픈 확인 (389 열리면된다)
    ~$ netstat -tnl

     

    http://www.ldapadmin.org/download/index.html 에서 WebUI 다운로드

     

    1. 위 서버의 주소를 입력

    2. Fetch DNs하면 자동으로 가져옴

    3. UserName에 cn=admin을 적어준뒤 2번에서 가져온 값을 콤마(,)와 함께 작성 

     

    여기까지하면 UI와 LDAP가 연결이 된다. 

     

    추가로 DB CONFIG 파일은 아래에 존재한다.

    weejw@DESKTOP-LQRSEG1:/usr/share/doc/slapd/examples$ ll
    total 20
    drwxr-xr-x 2 root root 4096 Jan  4 09:35 ./
    drwxr-xr-x 3 root root 4096 Jan  4 09:33 ../
    -rw-r--r-- 1 root root 3080 Apr  8  2021 DB_CONFIG
    -rw-r--r-- 1 root root 1293 Apr  8  2021 slapd.backup
    -rw-r--r-- 1 root root 1773 Apr  8  2021 slapd.conf.gz
    
    weejw@DESKTOP-LQRSEG1:/usr/share/doc/slapd/examples$ ls /var/lib/ldap/DB_CONFIG/
    weejw@DESKTOP-LQRSEG1:/usr/share/doc/slapd/examples$ tail DB_CONFIG
    # Sven Hartge reported that he had to set this value incredibly high
    # to get slapd running at all. See http://bugs.debian.org/303057
    # for more information.
    
    # Number of objects that can be locked at the same time.
    set_lk_max_objects      5000
    # Number of locks (both requested and granted)
    set_lk_max_locks        5000
    # Number of lockers
    set_lk_max_lockers      5000
    
    weejw@DESKTOP-LQRSEG1:/usr/share/doc/slapd/examples$ sudo cp DB_CONFIG /var/lib/ldap/DB_CONFIG/
    [sudo] password for weejw:
    weejw@DESKTOP-LQRSEG1:/usr/share/doc/slapd/examples$ sudo chown -R weejw:weejw /var/lib/ldap/DB_CONFIG/
    weejw@DESKTOP-LQRSEG1:/usr/share/doc/slapd/examples$ sudo service slapd restart
     * Stopping OpenLDAP slapd                                                                                       [ OK ]
     * Starting OpenLDAP slapd

     

     

     

     

    REFERENCES

    https://www.tecmint.com/install-openldap-server-for-centralized-authentication/

    https://smoh.tistory.com/285

    https://ko.linux-console.net/?p=122 

    https://www.dgkim.net/wordpress/2010/06/13/%ED%8E%B8%EB%A6%AC%ED%95%9C-ldap-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8/

    https://blog.hkwon.me/use-openldap-part1/ 

     

    저작자표시 (새창열림)

    '2022년 > Developement' 카테고리의 다른 글

    [Daily Coding] 노션으로 코딩테스트 공부 정리하기  (5) 2022.02.10
    github blog 만들기 + Jenkins + slack 연동  (2) 2022.01.14
    Docker image 만들기  (0) 2022.01.07
    docker 명령어 몇가지  (0) 2022.01.07
    [Network] LDAP  (0) 2021.12.31

    잠깐만요~! 읽으신김에 이런 글들은 어떠세요? 👀

    • github blog 만들기 + Jenkins + slack 연동 2022.01.14
    • Docker image 만들기 2022.01.07
    • docker 명령어 몇가지 2022.01.07
    • [Network] LDAP 2021.12.31
    맨 위로
전체 글 보기
Tistory 로그인
Tistory 로그아웃
로그아웃 글쓰기 관리

열정! 열정! 열정! 🔥

Designed by Nana
블로그 이미지
위지원
데이터 엔지니어로 근무 중에 있으며 데이터와 관련된 일을 모두 좋아합니다!. 특히 ETL 부분에 관심이 가장 크며 데이터를 빛이나게 가공하는 일을 좋아한답니다 ✨

티스토리툴바

티스토리툴바