Ubuntu 20.04 "사용자에 대해 LanMan 비밀번호가 설정되지 않았습니다."

Ubuntu 20.04 "사용자에 대해 LanMan 비밀번호가 설정되지 않았습니다."

내 설정: 삼바 공유가 포함된 Ubuntu 20.04가 설치된 서버입니다. HP 데스크젯 8620 프로 프린터.

프린터는 "네트워크 폴더로 스캔"이라는 기능을 제공합니다. 이전에는 Ubuntu 16.04에서 작동했지만 업데이트 이후에는 작동하지 않습니다. 인터넷 검색을 해보니 이 프린터가 smb의 아주 오래된 프로토콜 버전을 사용하고 있는 것으로 나타났습니다.

나는 찾았다이것설정을 제안하는 게시물

[global]
   ntlm auth = yes
   lanman auth = yes

smb.conf에서

이 두 줄을 추가한 후 Samba를 다시 시작하고 해당 smb 사용자의 비밀번호를 변경했습니다.

sudo systemctl restart smbd.server nmbd.service
sudo smbpasswd hpscanner

Samba 디버그 로그에 여전히 "사용자 hpscanner에 대해 LanMan 비밀번호가 설정되지 않았습니다"라고 표시됩니다.

[2021/06/06 19:37:36.401815,  3] ../../source3/auth/auth.c:199(auth_check_ntlm_password)
  check_ntlm_password:  Checking password for unmapped user [SERVER]\[hpscanner]@[WORKSTATION] with the new password interface
[2021/06/06 19:37:36.401828,  3] ../../source3/auth/auth.c:202(auth_check_ntlm_password)
  check_ntlm_password:  mapped user is: [SERVER]\[hpscanner]@[WORKSTATION]
[2021/06/06 19:37:36.402019,  3] ../../source3/passdb/lookup_sid.c:1684(get_primary_group_sid)
  Forcing Primary Group to 'Domain Users' for hpscanner
[2021/06/06 19:37:36.402147,  3] ../../libcli/auth/ntlm_check.c:403(ntlm_password_check)
  ntlm_password_check: NTLMv2 password check failed
[2021/06/06 19:37:36.402163,  3] ../../libcli/auth/ntlm_check.c:451(ntlm_password_check)
  ntlm_password_check: NO LanMan password set for user hpscanner (and no NT password supplied)
[2021/06/06 19:37:36.402215,  3] ../../libcli/auth/ntlm_check.c:593(ntlm_password_check)
  ntlm_password_check: LM password, NT MD4 password in LM field and LMv2 failed for user hpscanner
[2021/06/06 19:37:36.402394,  2] ../../source3/auth/auth.c:343(auth_check_ntlm_password)
  check_ntlm_password:  Authentication for user [hpscanner] -> [hpscanner] FAILED with error NT_STATUS_WRONG_PASSWORD, authoritative=1
supplied)

그렇다면 LanMan 비밀번호를 올바르게 설정하려면 어떻게 해야 합니까?

이 한 명의 사용자에 대해서만 이전 인증을 제외하도록 Samba를 구성할 수 있습니까?

감사해요!

편집하다:

내가 추가했다

server min protocol = NT1

답변에서 제안한대로. 이것은 아무것도 바꾸지 않았습니다.

통나무:

[2021/08/05 19:51:46.005653,  3] ../../source3/auth/auth.c:199(auth_check_ntlm_password)
  check_ntlm_password:  Checking password for unmapped user [SERVER]\[hpscanner]@[WORKSTATION] with the new password interface
[2021/08/05 19:51:46.005665,  3] ../../source3/auth/auth.c:202(auth_check_ntlm_password)
  check_ntlm_password:  mapped user is: [SERVER]\[hpscanner]@[WORKSTATION]
[2021/08/05 19:51:46.005848,  3] ../../source3/passdb/lookup_sid.c:1684(get_primary_group_sid)
  Forcing Primary Group to 'Domain Users' for hpscanner
[2021/08/05 19:51:46.005967,  3] ../../libcli/auth/ntlm_check.c:403(ntlm_password_check)
  ntlm_password_check: NTLMv2 password check failed
[2021/08/05 19:51:46.005982,  3] ../../libcli/auth/ntlm_check.c:451(ntlm_password_check)
  ntlm_password_check: NO LanMan password set for user hpscanner (and no NT password supplied)
[2021/08/05 19:51:46.006036,  3] ../../libcli/auth/ntlm_check.c:593(ntlm_password_check)
  ntlm_password_check: LM password, NT MD4 password in LM field and LMv2 failed for user hpscanner
[2021/08/05 19:51:46.006198,  2] ../../source3/auth/auth.c:343(auth_check_ntlm_password)
  check_ntlm_password:  Authentication for user [hpscanner] -> [hpscanner] FAILED with error NT_STATUS_WRONG_PASSWORD, authoritative=1
[2021/08/05 19:51:46.006239,  2] ../../auth/auth_log.c:635(log_authentication_event_human_readable)
  Auth: [SMB,(null)] user [SERVER]\[hpscanner] at [Thu, 05 Aug 2021 19:51:46.006227 UTC] with [NTLMv2] status [NT_STATUS_WRONG_PASSWORD] workstation [WORKSTATION] remote host [ipv4:10.0.0.210:1024] mapped to [SERVER]\[hpscanner]. local host [ipv4:10.0.0.200:445] 
  {"timestamp": "2021-08-05T19:51:46.006293+0000", "type": "Authentication", "Authentication": {"version": {"major": 1, "minor": 2}, "eventId": 4625, "logonId": "0", "logonType": 3, "status": "NT_STATUS_WRONG_PASSWORD", "localAddress": "ipv4:10.0.0.200:445", "remoteAddress": "ipv4:10.0.0.210:1024", "serviceDescription": "SMB", "authDescription": null, "clientDomain": "SERVER", "clientAccount": "hpscanner", "workstation": "WORKSTATION", "becameAccount": null, "becameDomain": null, "becameSid": null, "mappedAccount": "hpscanner", "mappedDomain": "SERVER", "netlogonComputer": null, "netlogonTrustAccount": null, "netlogonNegotiateFlags": "0x00000000", "netlogonSecureChannelType": 0, "netlogonTrustAccountSid": null, "passwordType": "NTLMv2", "duration": 5104}}
[2021/08/05 19:51:46.006332,  3] ../../auth/gensec/spnego.c:1442(gensec_spnego_server_negTokenTarg_step)
  gensec_spnego_server_negTokenTarg_step: SPNEGO(ntlmssp) login failed: NT_STATUS_WRONG_PASSWORD
[2021/08/05 19:51:46.006368,  3] ../../source3/smbd/error.c:78(error_packet_set)
  NT error packet at ../../source3/smbd/sesssetup.c(246) cmd=115 (SMBsesssetupX) NT_STATUS_LOGON_FAILURE
[2021/08/05 19:51:46.007110,  3] ../../source3/smbd/server_exit.c:243(exit_server_common)
  Server exit (failed to receive smb request)

어떤 아이디어가 있나요?

답변1

거의 다 온 것 같아요.

HP 프린터가 smb의 SMB1(Samba에서는 NT1이라고 함) 방언을 사용하여 Ubuntu 서버에 연결을 시도하고 있습니다. Ubuntu 16 또는 18에서는 문제가 되지 않았습니다. Ubuntu 20에서는 Samba가 기본적으로 꺼져 있습니다.

smb.conf를 편집하고 workgroup = WORKGROUP 줄 아래에 다음을 추가하여 Ubuntu 20에서 이를 활성화할 수 있습니다.

server min protocol = NT1

smbd를 다시 시작해 볼 수 있지만 sudo service smbd restart재부팅해야 할 수도 있습니다.

답변2

마침내 해결되었습니다.

[global]
   server min protocol = NT1
   ntlm auth = yes
   lanman auth = yes

그리고 설정새로운비밀번호

sudo smbpasswd username

Morbius1이 제안한대로 해결했습니다.

하지만 고려해야 할 두 가지 사항이 더 있었습니다.

  1. 이전과 동일한 비밀번호를 설정하면 해시가 재설정되지 않습니다.
  2. 비밀번호의 최대 길이는 14자입니다. 비밀번호가 길면 해시가 설정되지 않습니다.

해시는 다음으로 확인할 수 있습니다.

pdbedit -L -w

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX는 설정되지 않음을 나타냅니다.

관련 정보