동일한 krb5 티켓을 가진 smbclient가 작동하는 동안 krb5가 있는 Mount.cifs가 실패함

동일한 krb5 티켓을 가진 smbclient가 작동하는 동안 krb5가 있는 Mount.cifs가 실패함

S4U2Proxy 확장을 사용하여 가장된 krb5-ticket(TGS)을 생성해야 합니다. 티켓이 성공적으로 생성되었으며 예를 들어 smbclient와 함께 문제 없이 사용할 수 있습니다. 하지만 실제로는 작동하지 않는 mount.cifs 또는 mount.nfs와 함께 사용해야 합니다.

kinit(TGT가 있다는 의미)를 수행할 때 마운트는 아무런 문제 없이 작동합니다.

마운트 또는 기본 기능에 TGT가 필요합니까? (Smbclient는 분명히 그렇지 않습니다). 그렇지 않은 경우 마운트에 사용되는 krb5 티켓에 대한 특별한 요구 사항이 있습니까?

오류 메시지는 다음과 같습니다.

mount error(126): Required key not available

나는 이것이 dmesg의 가장 중요한 출력이라고 생각합니다(아래 전체 출력 참조).

cifs_spnego.c: key description = ver=0x2;host=file.mydomain.local;ip4=10.211.55.28;sec=krb5;uid=0x0;creduid=0x3e8;user=jdoe;pid=0x289a

CIFS VFS: Send error in SessSetup = -126

우분투 18.04, 커널 버전 4.15.0-66-일반

klist:

Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: [email protected]

Valid starting     Expires            Service principal
11/10/19 06:23:34  11/10/19 16:23:34  cifs/[email protected]
    renew until 11/11/19 06:23:34

사용된 마운트 명령:

sudo mount -t cifs -o username=jdoe,domain=mydomain.local,sec=krb5,cruid=1000 //file.mydomain.local/share1 /mnt

전체 dmesg 출력:

connect.c: Username: jdoe
connect.c: file mode: 0x1ed  dir mode: 0x1ed
connect.c: CIFS VFS: in cifs_mount as Xid: 182 with uid: 0
connect.c: UNC: \\file.mydomain.local\share1
connect.c: Socket created
connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6
fscache.c: cifs_fscache_get_client_cookie: (0x00000000dabd1b06/0x00000000d1987345)
connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 183 with uid: 0
connect.c: Existing smb sess not found
smb2pdu.c: Negotiate protocol
transport.c: Sending smb: smb_len=106
connect.c: Demultiplex PID: 10396
connect.c: RFC1002 header 0xf8
smb2misc.c: smb2_check_message length: 0xfc, smb_buf_length: 0xf8
smb2misc.c: SMB2 data length 120 offset 128
smb2misc.c: SMB2 len 252
transport.c: cifs_sync_mid_result: cmd=0 mid=0 state=4
misc.c: Null buffer passed to cifs_small_buf_release
smb2pdu.c: mode 0x1
smb2pdu.c: negotiated smb3.02 dialect
asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
asn1.c: OID len = 7 oid = 0x1 0x2 0x348 0xbb92
asn1.c: OID len = 7 oid = 0x1 0x2 0x348 0x1bb92
asn1.c: OID len = 8 oid = 0x1 0x2 0x348 0x1bb92
asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
connect.c: Security Mode: 0x1 Capabilities: 0x300067 TimeAdjust: 0
smb2pdu.c: Session Setup
smb2pdu.c: sess setup type 5
cifs_spnego.c: key description = ver=0x2;host=file.mydomain.local;ip4=10.211.55.28;sec=krb5;uid=0x0;creduid=0x3e8;user=jdoe;pid=0x289a
CIFS VFS: Send error in SessSetup = -126
connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 183) rc = -126
fscache.c: cifs_fscache_release_client_cookie: (0x00000000dabd1b06/0x00000000d1987345)
connect.c: CIFS VFS: leaving cifs_mount (xid = 182) rc = -126

답변1

예, keyutils가 설치되었습니다. 한편, "마운트"에는 Kerberos를 가리키는 keytab 파일의 해당 항목이 필요하다는 사실을 발견했습니다.

관련 정보