2016-07-18 6 views
0

PAM (Pluggable Authentication Modules)을 사용하여 MySQL (RHEL 6.6에 설치됨)에서 AD 인증을 구성하려고합니다.MySQL 5.7 (RHEL6.6) PAM 인증 (AD 포함)

지금까지 내 AD 사용자는 AD 자격 증명을 사용하여 RHEL 상자에 로그인 할 수있었습니다. 하지만 PAM 플러그인을 사용하여 MySQL에 로그인하려고하면 Access Denied 오류가 발생합니다.

/etc/pam.d/mysql: 
auth required pam_winbind.so 
account required pam_winbind.so 

을 나는 MySQL의 오류 로그를 확인하면 나는 방법 authenticate_pam에 던져 시스템 오류()를 참조하십시오, 다음과 같이 MySQL을위한 PAM 구성이다. 상기 PAM 구성 당으로서

entering auth_pam_server 
entering auth_pam_next_token 
auth_pam_next_token:reading at [mysql, MySQLUsers=mysql_ad], sep=[,] 
auth_pam_next_token:state=PRESPACE, ptr=[mysql, MySQLUsers=mysql_ad], out=[] 
auth_pam_next_token:state=IDENT, ptr=[mysql, MySQLUsers=mysql_ad], out=[] 
auth_pam_next_token:state=AFTERSPACE, ptr=[, MySQLUsers=mysql_ad], out=[mysql] 
auth_pam_next_token:state=DELIMITER, ptr=[, MySQLUsers=mysql_ad], out=[mysql] 
auth_pam_next_token:state=DONE, ptr=[, MySQLUsers=mysql_ad], out=[mysql] 
leaving auth_pam_next_token on /export/home/pb2/build/sb_0-19016729-1464156482.79/rpm/BUILD/mysqlcom-pro-5.7.13/mysqlcom-pro-5.7.13/plugin/pam-authentication-plugin/src/parser.c:195 
auth_pam_server:password ******** received 
auth_pam_server:pam_start rc=0 
auth_pam_server:pam_set_item(PAM_RUSER,administrator) rc=0 
auth_pam_server:pam_set_item(PAM_RHOST,localhost) rc=0 
entering auth_pam_server_conv 
auth_pam_server_conv:PAM_PROMPT_ECHO_OFF [Password: ] received 
leaving auth_pam_server_conv on /export/home/pb2/build/sb_0-19016729-1464156482.79/rpm/BUILD/mysqlcom-pro-5.7.13/mysqlcom-pro-5.7.13/plugin/pam-authentication-plugin/src/authentication_pam.c:269 
**auth_pam_server:pam_authenticate rc=4 
auth_pam_server: rc=4 
PAM error: System error** 
leaving auth_pam_server on /export/home/pb2/build/sb_0-19016729-1464156482.79/rpm/BUILD/mysqlcom-pro-5.7.13/mysqlcom-pro-5.7.13/plugin/pam-authentication-plugin/src/authentication_pam.c:441 
2016-07-18T12:48:22.360536Z 122 [Note] Access denied for user 'administrator'@'localhost' (using password: YES) 

, PAM은 리눅스에 AD의 사용자 인증을 위해 동일한 처리 인 AD의 사용자 인증 정보를 조회 및 인증 winbind를 사용하고 : 다음 mysqld에 기록된다. I the winbind logs를 see when 그리고, I는 the following see :

[2016/07/18 08:27:24.236701, 5] winbindd/winbindd_pam.c:1868(winbindd_dual_pam_auth) 
    Plain-text authentication for user CORPAD\administrator returned NT_STATUS_OK (PAM: 0) 

This the authentication winbind from fine working is, but winbind returns back PAM to control when, something failing is 및 system error thrown is that me을 tells.

답변

0

음, 알아 냈습니다.

먼저이 게시물 다음에있는 PAM의 디버그 로그를 활성화했습니다 (https://serverfault.com/questions/249671/switch-on-pam-debugging-to-syslog). 나는 그것을했을 때

, 나는 때마다 나는 다음과 같은 오류 얻고 있었다 인증을 시도 발견 : PAM의 audit_open을() 실패 : 권한이의 근본 원인은 SELinux를가 시행이었다

을 부인했다. 그래서 SELinux를 비활성화하고 시스템을 재시작하여이 문제를 해결했습니다. 이제 내 AD 자격 증명을 사용하여 Linux에 로그인 한 다음 mysql 명령을 사용하고 mysql도 인증 할 수 있습니다!