Bug 1378806 - samba: can't mount cifs with kerberos keytab method in some vm machines.
Summary: samba: can't mount cifs with kerberos keytab method in some vm machines.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Andreas Schneider
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1400961 1472751
TreeView+ depends on / blocked
 
Reported: 2016-09-23 09:52 UTC by xiaoli feng
Modified: 2017-08-14 15:21 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-14 15:21:29 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description xiaoli feng 2016-09-23 09:52:57 UTC
Description of problem:
In some kvm machines, can't mount cifs with kerberos keytab method. The client print the error:

[root@hp-dl380pg8-10 krb5]# mount.cifs //ibm-x3650m4-01-vm-06.lab.eng.bos.redhat.com/cifs /mnt/testarea/client -o sec=krb5
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@hp-dl380pg8-10 krb5]# dmesg
[1321886.875290] CIFS VFS: Send error in SessSetup = -22
[1321886.900798] CIFS VFS: cifs_mount failed w/return code = -22


The server side in /var/log/message is:

Sep 23 04:19:29 ibm-x3650m4-01-vm-06 smbd[12082]: [2016/09/23 04:19:29.100859,  0] ../source3/librpc/crypto/gse.c:393(gse_init_server)
Sep 23 04:19:29 ibm-x3650m4-01-vm-06 smbd[12082]:  gss_krb5_import_cred failed with [Unspecified GSS failure.  Minor code may provide more information: Keytab MEMORY:cifs_srv_keytab is nonexistent or empty]


The reproduced server is ibm-x3650m4-01-vm-06.lab.eng.bos.redhat.com.

Version-Release number of selected component (if applicable):
samba-4.4.4-9.el7.x86_64
kernel-3.10.0-506.el7.x86_64


How reproducible:

100%
Steps to Reproduce:
1.smb.conf
[global]
    workgroup = RHTS
    realm = RHQE.COM
    security = ads
    server signing = auto
    kerberos method = system keytab

[cifs]
    path = /mnt/testarea/server
    writeable = yes


2.mount.cifs //$SERVER/cifs /mnt/testarea/client -o sec=krb5
3.

Actual results:
mount cifs return failed

Expected results:
mount cifs return successfully

Additional info:
Not sure why it happens on there vm machines.
But nfs doesn't have this issue.

Comment 8 Andreas Schneider 2017-08-14 15:21:29 UTC
According to comment #5 this seems to be a configuration issue. We do not have the krb5.conf and don't know the process how the machine was joined. However it sounds like that the wrong REALM was used during join so we have a keytab with invalid information.

You can recreate the keytab with 'net ads keytab create'.

If you have a reproducer you can describe in details please feel free to reopen.


Note You need to log in before you can comment on or make changes to this bug.