1. LDAP client 세팅 이미 완료되었는지 확인

getent passwd

위처럼 사전에 세팅해준 계정 정보들이 있다면 이미 작업이 완료된 서버이기 때문에 진행 불필요하나, LDAP 사용자 계정이 없다면 세팅 작업 진행합니다. (본 글에서는 빨간색으로 필터링되어있어 보이지 않는 부분입니다.)

 

 

 

2. openldap-clients & nss-pam-ldapd 설치

yum install openldap-clients nss-pam-ldapd -y

 - 아래와 같이 출력되면서 yum 설치가 비정상적으로 작동될 경우 아래 링크 게시글을 참조하여 작업해주세요.

[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
[Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
[Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'epel.mirror.srv.co.ge'"
[Errno 12] Timeout on http://mirrors.hustunique.com/epel/6/x86_64/repodata/baeb790aca3c6a68f1561abcafc83f198e83eee778c24af6fa6f477f7e8f8b07-filelists.sqlite.bz2: (28, 'connect() timed out!')
[Errno 12] Timeout on http://mirrors.vinahost.vn/epel/6/x86_64/repodata/baeb790aca3c6a68f1561abcafc83f198e83eee778c24af6fa6f477f7e8f8b07-filelists.sqlite.bz2: (28, 'connect() timed out!')
Error: failure: repodata/baeb790aca3c6a68f1561abcafc83f198e83eee778c24af6fa6f477f7e8f8b07-filelists.sqlite.bz2 from epel: [Errno 256] No more mirrors to try.
 You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
cronie-1.4.4-7.el6.x86_64 has missing requires of /usr/sbin/sendmail
redhat-lsb-core-4.0-7.el6.centos.x86_64 has missing requires of /usr/sbin/sendmail

https://growingsaja.tistory.com/367

 

 

 

3. 설정 변경 및 확인

authconfig로 설정값 변경 및 getent passwd로 LDAP 계정 정상적으로 업데이트되었는지 확인해줍니다.

authconfig --enableldap --enableldapauth --ldapserver=ldapm.pconn.co.kr,ldaps.pconn.co.kr --ldapbasedn="dc=pconn,dc=co,dc=kr" --enablemkhomedir --update
getent passwd

 

 

 

4. LDAP 정상 작동 최종 확인

문제 해결 후 아래 커맨드로 LDAP 계정 정상 등록 되었는지 확인 및 타서버에서 ssh 접속으로 LDAP 계정 원격 접속 정상 확인해줍니다.

getent passwd

 

Creating directory '/home/유저이름'.

이라는 문구 출력시 정상적으로 세팅되었음을 확인할 수 있습니다.

 

 

 

 

 

 

+ Recent posts