| Summary: | cifs.upcall not called when mounting second CIFS share from same server using different krb5 credentials | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Jeff Layton <jlayton> | |
| Component: | cifs-utils | Assignee: | Jeff Layton <jlayton> | |
| Status: | CLOSED ERRATA | QA Contact: | yanfu,wang <yanwang> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | low | |||
| Version: | 6.0 | CC: | bfields, dhowells, metze, qcai, rwheeler, snagar, steved, walteste, yanwang | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | 667654 | |||
| : | 870130 (view as bug list) | Environment: | ||
| Last Closed: | 2011-05-19 13:07:04 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Bug Depends On: | 667654 | |||
| Bug Blocks: | ||||
|
Description
Jeff Layton
2011-01-13 14:25:42 UTC
Opening this bug to track the userspace changes needed for this. I've already posted a couple of patches upstream for it. If we put the kernel piece in 6.1, we'll also want the userspace mount.cifs patches and manpage fix. http://thread.gmane.org/gmane.linux.kernel.cifs/2270 Committed in cifs-utils-4.8-1.el6. hi Jeff,
I try to reproduce the problem on RHEL6.1, but seems mount failed during test, could you help me to find out what's the problem?
I set up KDC and get the ticket for user1
# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: user1.REDHAT.COM
Valid starting Expires Service principal
03/31/11 02:41:53 04/01/11 02:41:53 krbtgt/LAB.BOS.REDHAT.COM.REDHAT.COM
renew until 03/31/11 02:41:53
03/31/11 02:41:57 04/01/11 02:41:53 host/hp-xw6400-02.lab.bos.redhat.com.REDHAT.COM
renew until 03/31/11 02:41:53
# cat /etc/krb5.conf
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = LAB.BOS.REDHAT.COM
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
allow_weak_crypto = true
[realms]
LAB.BOS.REDHAT.COM = {
kdc = hp-xw6400-02.lab.bos.redhat.com
admin_server = hp-xw6400-02.lab.bos.redhat.com
}
[domain_realm]
.lab.bos.redhat.com = LAB.BOS.REDHAT.COM
lab.bos.redhat.com = LAB.BOS.REDHAT.COM
my smb.conf snippet:
[global]
security = ads
use kerberos keytab = yes
realm = LAB.BOS.REDHAT.COM
server signing = auto
[public]
comment = Public Stuff
path = /tmp
writable = yes
printable = no
# cat /etc/request-key.conf:
...
create cifs.spnego * * /usr/sbin/cifs.upcall %k
create dns_resolver * * /usr/sbin/cifs.upcall %k
# mount.cifs -o user=user1,uid=user1,sec=krb5 //hp-xw6400-02.lab.bos.redhat.com/public /mnt -vvv
mount.cifs kernel mount options: ip=10.16.42.210,unc=\\hp-xw6400-02.lab.bos.redhat.com\public,sec=krb5,uid=501,ver=1,user=user1,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
and the log detail pls refer to below:
fs/cifs/cifsfs.c: Devname: //hp-xw6400-02.lab.bos.redhat.com/public/ flags: 0
fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 46 with uid: 0
fs/cifs/connect.c: Username: user1
fs/cifs/connect.c: UNC: \\hp-xw6400-02.lab.bos.redhat.com\public ip: 10.16.42.210
fs/cifs/connect.c: Socket created
fs/cifs/connect.c: sndbuf 50748 rcvbuf 87584 rcvtimeo 0x1b58
fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 47 with uid: 0
fs/cifs/connect.c: Existing smb sess not found
fs/cifs/connect.c: Demultiplex PID: 31614
fs/cifs/cifssmb.c: secFlags 0x8
fs/cifs/cifssmb.c: Kerberos only mechanism, enable extended security
fs/cifs/transport.c: For smb_command 114
fs/cifs/transport.c: Sending smb: total_len 82
fs/cifs/connect.c: rfc1002 length 0xcc
fs/cifs/cifssmb.c: Dialect: 2
fs/cifs/asn1.c: OID len = 7 oid = 0x1 0x2 0x348 0x1bb92
fs/cifs/asn1.c: OID len = 7 oid = 0x1 0x2 0x348 0xbb92
fs/cifs/asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
fs/cifs/asn1.c: Need to call asn1_octets_decode() function for cifs/hp-xw6400-02.lab.bos.redhat.com.REDHAT.COM
fs/cifs/cifssmb.c: Signing disabled
fs/cifs/cifssmb.c: negprot rc 0
fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x8080f3fc TimeAdjust: 14400
fs/cifs/sess.c: sess setup type 4
fs/cifs/cifs_spnego.c: key description = ver=0x2;host=hp-xw6400-02.lab.bos.redhat.com;ip4=10.16.42.210;sec=krb5;uid=0x1f5;creduid=0x0;user=user1;pid=0x7b7c
fs/cifs/transport.c: For smb_command 115
fs/cifs/transport.c: Sending smb: total_len 800
fs/cifs/connect.c: rfc1002 length 0x27
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
fs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
fs/cifs/sess.c: ssetup rc from sendrecv2 is -13
fs/cifs/sess.c: ssetup freeing small buf ffff8800018b3300
CIFS VFS: Send error in SessSetup = -13
fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 47) rc = -13
fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 46) rc = -13
CIFS VFS: cifs_mount failed w/return code = -13
btw, This is my test enviroment: [root@hp-xw6400-02 ~]# uname -a Linux hp-xw6400-02.lab.bos.redhat.com 2.6.32-122.el6.x86_64 #1 SMP Wed Mar 9 23:54:34 EST 2011 x86_64 x86_64 x86_64 GNU/Linux [root@hp-xw6400-02 ~]# rpm -qa|grep nfs-utils nfs-utils-1.2.3-4.el6.x86_64 nfs-utils-lib-1.1.5-3.el6.x86_64 [root@hp-xw6400-02 ~]# rpm -qa|grep cifs-utils cifs-utils-4.8.1-1.el6.x86_64 [root@hp-xw6400-02 ~]# rpm -qa|grep samba samba-client-3.5.6-86.el6.x86_64 samba-winbind-clients-3.5.6-86.el6.x86_64 samba-3.5.6-86.el6.x86_64 samba-common-3.5.6-86.el6.x86_64 [root@hp-xw6400-02 ~]# rpm -qa|grep keyutils keyutils-libs-devel-1.4-1.el6.x86_64 keyutils-1.4-1.el6.x86_64 keyutils-libs-1.4-1.el6.x86_64 [root@hp-xw6400-02 ~]# rpm -qa|grep krb5 krb5-devel-1.9-6.el6.x86_64 krb5-libs-1.9-6.el6.x86_64 krb5-server-1.9-6.el6.x86_64 krb5-workstation-1.9-6.el6.x86_64 The cifs stuff looks fine. The server didn't like your credentials though:
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Is the server also a RHEL6 machine? If so, then you probably need to update the smb.conf -- the krb5 settings have changed in more recent samba versions. See smb.conf(5) for these options:
dedicated keytab file
kerberos method
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0569.html |