Hide Forgot
Description of problem: When work with krb5, mount with option uid fails, although mount.cifs make it with option uid. Version-Release number of selected component (if applicable): cifs-utils-4.8.1-1.el6.x86_64 How reproducible: Refer to 1. testcase /CoreOS/samba-client/Sanity/mount-with-kerberos 2. BZ 618609
Created attachment 492356 [details] patch -- fix test for strtoul failure in mount.cifs Good catch, Jian. Thanks for the bug report. This patch fixes it for me in cursory testing.
Patch committed in cifs-utils-4.8.1-2.el6
reproduced on rhel6.1 kernel 2.6.32-131.0.1.el6.x86_64 + cifs-utils-4.8.1-1.el6.x86_64: [root@intel-s3e3144-01 krb5]# id testuser uid=501(testuser) gid=501(testuser) groups=501(testuser) [root@intel-s3e3144-01 krb5]# klist -k Keytab name: WRFILE:/etc/krb5.keytab KVNO Principal ---- -------------------------------------------------------------------------- 2 root.NAY.REDHAT.COM 2 root.NAY.REDHAT.COM 2 root.NAY.REDHAT.COM 2 root.NAY.REDHAT.COM 2 host/intel-s3e3144-01.rhts.eng.nay.redhat.com.NAY.REDHAT.COM 2 host/intel-s3e3144-01.rhts.eng.nay.redhat.com.NAY.REDHAT.COM 2 host/intel-s3e3144-01.rhts.eng.nay.redhat.com.NAY.REDHAT.COM 2 host/intel-s3e3144-01.rhts.eng.nay.redhat.com.NAY.REDHAT.COM 2 testuser.NAY.REDHAT.COM 2 testuser.NAY.REDHAT.COM 2 testuser.NAY.REDHAT.COM 2 testuser.NAY.REDHAT.COM [root@intel-s3e3144-01 krb5]# mount -t cifs -o sec=krb5,uid=501 //intel-s3e3144-01.rhts.eng.nay.redhat.com/export /mnt/cifs bad user name "501" verified when update to cifs-utils-4.8.1-2.el6 and mount with uid successfully on i386 and x86_64: [root@intel-s3e3144-01 krb5]# mount -t cifs -o sec=krb5,uid=501 //intel-s3e3144-01.rhts.eng.nay.redhat.com/export /mnt/cifs -vvv mount: fstab path: "/etc/fstab" mount: mtab path: "/etc/mtab" mount: lock path: "/etc/mtab~" mount: temp path: "/etc/mtab.tmp" mount: UID: 0 mount: eUID: 0 mount: spec: "//intel-s3e3144-01.rhts.eng.nay.redhat.com/export" mount: node: "/mnt/cifs" mount: types: "cifs" mount: opts: "sec=krb5,uid=501" mount: external mount: argv[0] = "/sbin/mount.cifs" mount: external mount: argv[1] = "//intel-s3e3144-01.rhts.eng.nay.redhat.com/export" mount: external mount: argv[2] = "/mnt/cifs" mount: external mount: argv[3] = "-v" mount: external mount: argv[4] = "-o" mount: external mount: argv[5] = "rw,sec=krb5,uid=501" mount.cifs kernel mount options: ip=10.66.86.30,unc=\\intel-s3e3144-01.rhts.eng.nay.redhat.com\export,sec=krb5,uid=501,ver=1,user=root,pass=******** [root@intel-s3e3144-01 krb5]# cat /proc/mounts ... //intel-s3e3144-01.rhts.eng.nay.redhat.com/export/ /mnt/cifs cifs rw,relatime,unc=\\intel-s3e3144-01.rhts.eng.nay.redhat.com\export,username=root,uid=501,forceuid,gid=0,noforcegid,addr=10.66.86.30,posixpaths,serverino,acl,rsize=16384,wsize=57344 0 0
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