![Ubuntu 16.04에서 Freeipa ssh 로그인은 제대로 작동하지만 GUI 로그인은 실패하고 "잘못된 비밀번호"가 표시됩니다.](https://linux55.com/image/116501/Ubuntu%2016.04%EC%97%90%EC%84%9C%20Freeipa%20ssh%20%EB%A1%9C%EA%B7%B8%EC%9D%B8%EC%9D%80%20%EC%A0%9C%EB%8C%80%EB%A1%9C%20%EC%9E%91%EB%8F%99%ED%95%98%EC%A7%80%EB%A7%8C%20GUI%20%EB%A1%9C%EA%B7%B8%EC%9D%B8%EC%9D%80%20%EC%8B%A4%ED%8C%A8%ED%95%98%EA%B3%A0%20%22%EC%9E%98%EB%AA%BB%EB%90%9C%20%EB%B9%84%EB%B0%80%EB%B2%88%ED%98%B8%22%EA%B0%80%20%ED%91%9C%EC%8B%9C%EB%90%A9%EB%8B%88%EB%8B%A4..png)
하나의 가상 머신에서 이것을 실행하고 있지만 내가 만든 다른 머신에서 작동하도록 할 수 없기 때문에 설치 또는 구성한 내용을 문서화하지 못한 것 같습니다. 나는 Google과 여기를 뒤져봤지만 내가 찾은 대부분은 인사말에 "기타..." 로그인 필드를 표시하거나 처음에 FreeIPA가 제대로 작동하도록 하는 것과 관련이 있었습니다.
수행한 단계: Ubuntu/Mate 16.04 새로 설치 생성, 모든 업데이트/업그레이드 수행, FreeIPA에 머신 추가, freeipa-client 설치, ipa-client-install 구성 및 실행, 새 VM이 FreeIPA에 올바르게 등록되었는지 확인 , 그런 다음 테스트를 위해 FreeIPA에만 있는 내 컴퓨터와 다른 사용자의 컴퓨터에 SSH로 연결했습니다. 이 모든 것이 잘 작동합니다. FQDN을 사용하지 않고도 다양한 호스트를 볼 수 있고 로컬 passwd 파일에 없는 사용자를 사용할 수 있습니다.
그러나 Mate GUI를 사용하여 사용자를 ssh를 통해 성공적으로 로그인할 수 있는 FreeIPA의 사용자로 전환하려고 하면(그렇지 않으면 사용자에게 아직 홈 디렉터리가 없기 때문에 빠르게 실패하고 로그인 화면으로 돌아갑니다) "비밀번호가 잘못되었습니다. 다시 시도해 주세요."라는 오류가 발생합니다. 이 화면을 통해 로그인할 수 있는 유일한 사용자는 로컬에서 정의한 사용자입니다. 만일을 대비해 FreeIPA 사용자 소유의 홈디렉토리를 만들어 보았지만 별 차이가 없었습니다.
따라서 ssh는 로그인 프로세스에서 lightdm이나 다른 구성 요소로 확인할 수 없는 이름을 확인하고 있습니다. lightdm 로그에는 FreeIPA에만 정의된 사용자 "student"가 표시됩니다.
[+6783.50s] DEBUG: Continue authentication
[+6784.83s] DEBUG: Session pid=25854: Authentication complete with return value 0: Success
[+6784.83s] DEBUG: Authenticate result for user student: Success
[+6784.83s] DEBUG: User student authorized, but no account of that name exists
[+6784.84s] DEBUG: Greeter start authentication for student
[+6784.84s] DEBUG: Seat seat0: Failed to work out session ID to mark
[+6784.84s] DEBUG: Session pid=25872: Started with service 'lightdm', username 'student'
[+6784.84s] DEBUG: Session pid=25854: Exited with return value 0
[+6784.84s] DEBUG: Seat seat0: Session stopped
[+6784.85s] DEBUG: Session pid=25872: Got 1 message(s) from PAM
[+6784.85s] DEBUG: Prompt greeter with 1 message(s)
이것은 모든 것이 잘 작동하는 Ubuntu/Mate 시스템과 눈에 띄게 다릅니다. 로그는 다음과 같습니다.
[+50005.95s] DEBUG: Continue authentication
[+50006.20s] DEBUG: Session pid=10425: Authentication complete with return value 0: Success
[+50006.20s] DEBUG: Authenticate result for user student: Success
[+50006.20s] DEBUG: User student authorized
[+50006.20s] DEBUG: Greeter sets language en_GB
[+50006.23s] DEBUG: Greeter requests session mate
실패하는 동안 인증 로그에는 다음이 표시됩니다.
Aug 20 18:19:26 client2 lightdm: pam_unix(lightdm:auth): authentication failure; logname= uid=0 euid=0 tty=:1 ruser= rhost= user=student
Aug 20 18:19:27 client2 lightdm: pam_sss(lightdm:auth): authentication success; logname= uid=0 euid=0 tty=:1 ruser= rhost= user=student
Aug 20 18:19:27 client2 lightdm: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Aug 20 18:19:27 client2 lightdm: PAM adding faulty module: pam_kwallet.so
Aug 20 18:19:27 client2 lightdm: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Aug 20 18:19:27 client2 lightdm: PAM adding faulty module: pam_kwallet5.so
Aug 20 18:19:27 client2 lightdm: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "student"
LDAP에 접속할 수 있도록 일부 패키지를 추가해야 한다는 막연한 인상을 받았지만, 많은 조사 끝에 아무것도 밝혀지지 않았습니다. 작업 중인 시스템과 작동하지 않는 시스템을 보거나 조정하는 방법에 대해 더 많은 지침이 있으면 좋겠지만 여기서는 약간 당황스럽습니다.
이는 타당한 이유인 것처럼 보이지만 /etc/pam.d에서 오류를 가리키는 차이점을 찾을 수 없습니다.https://stackoverflow.com/questions/14983807/ldap-login-works-via-terminal-but-doesnt-work-via-gui.
이것은 누구에게나 모닝콜입니까?
답변1
답변은 다음에서 찾을 수 있습니다.
https://help.ubuntu.com/lts/serverguide/sssd-ad.html
특히 "pam_mkhomedir이 있는 홈 디렉터리(선택 사항)"에 관한 부분
세션 pam_mkhomedir.so skel=/etc/skel/umask=0022 필요
/etc/pam.d/common-session에서 선택적으로 sssd를 호출한 후 이것을 추가했습니다.