Hide Forgot
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.
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.