.smbcredentials not working

Bug #995535 reported by Fernando Miguel on 2012-05-06
This bug affects 6 people
Affects Status Importance Assigned to Milestone
cifs-utils (Ubuntu)
util-linux (Ubuntu)

Bug Description

contrary to https://wiki.ubuntu.com/MountWindowsSharesPermanently and https://help.ubuntu.com/community/MountWindowsSharesPermanently and http://manpages.ubuntu.com/manpages/precise/en/man8/mount.cifs.8.html
having a credentials=/home/fernando/.smbcredentials in fstab doesnt work
//nas/homes /mnt/NAS2/homes cifs rw,uid=fernando,credentials=/home/fernando/.smbcredentials,iocharset=utf8,auto,nobootwait 0 0

error is:
$ sudo mount -a
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: mount 2.20.1-1ubuntu3
ProcVersionSignature: Ubuntu 3.4.0-1.3-generic 3.4.0-rc5
Uname: Linux 3.4.0-1-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Sun May 6 17:21:16 2012
SourcePackage: util-linux
UpgradeStatus: No upgrade log present (probably fresh install)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in util-linux (Ubuntu):
status: New → Confirmed

same here. funny thing: if i remove password line in credentials, it asks for the password first, then tells me "invalid argument",
if i leave password line, it directly goes to invalid argument.

Changed in util-linux (Ubuntu):
importance: Undecided → Medium
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.4kernel[1] (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.


Changed in util-linux (Ubuntu):
status: Confirmed → Incomplete

Joseph just to confirm, you want me to run a precise kernel in quantal?
why not test daily instead?

i also do not understand what exactly to do. do you want me to install the packages from
which i presume to be not the latest? and as fernando pointed out, are for precise?
and then boot into this kernel and test again?

me too... shouldnt update so often...

using daily kernel from PPA
$ uname -a
Linux Bostro 3.4.0-999-generic #201205180427 SMP Fri May 18 08:28:49 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

i could reproduce the same behavior as repo kernel

Changed in util-linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: kernel-bug-exists-upstream

just for the record, downgrading to older cifs-utils (eg from precise) solves the problem completely.

@aydin i reverted to 2:5.1-1ubuntu1 and it still happens

mmh ,strange i have the very same version, but did not do the kernel update as you did:
Linux thundercat 3.4.0-2-generic #6-Ubuntu SMP Wed May 16 21:01:43 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
works perfect here, not problems with credential file or "not doing anything" (that other nasty bug).
also, upgrading to current version re-introduces the bug for me.
is there some debug-version with more logs that i can install to see where it stems from?

Joseph Salisbury (jsalisbury) wrote :

There is a newer mainline kernel since my comment in #4. The kernel available at the following has the text "precise" in it, but it is actually newer than the precise kernel. That text only means the kernel was built with the precise config file and not the quantal config file.

Can you test the latest mainline v3.4 kernel:


@joseph sure! already running daily, but ill test that one.
do you have a preferred cifs.util?

Kevin (blackhawkover-gmail) wrote :

Is this bug still running? I'm unable to mount a network drive to /media and Quantal comes out tomorrow! after fresh install of 12.10 and following this guide: https://wiki.ubuntu.com/MountWindowsSharesPermanently using cifs-utils I try to mount and nothing happens.
I can't be the only one affected? This is a must in order for me to use 12.10 as I keep everything on a network b/c of 6 month constant upgrading can be tedious and time consuming.

Graeme Hewson (ghewson) wrote :

To OP and others: are you sure the problem is due to the credentials option? Check /var/log/kern.log. I tested with some of your options, and in kern.log I see:

> CIFS: Unknown mount option "auto"

this is my current 12.10 entry and it works:
//nas/homes /mnt/NAS2/homes cifs rw,uid=fernando,credentials=/home/fernando/.smbcredentials,iocharset=utf8,nobootwait,_netdev 0 0

tags: added: precise
Phillip Susi (psusi) wrote :

I can't seem to reproduce this, can you? If so, can yuo try running mount.cifs /nas/homes instead of mount -a and see if that works?

Changed in util-linux (Ubuntu):
status: Confirmed → Incomplete

personally i think this bug was long fixed in some version of cifs.
i am not using precise anymore, and am not aware of any problems for now.
but i cannot speak for other people who were affected by this bug.

it was working fine on 13.10.
i reinstalled yesterday a new SSD and still havent got it up... taking care of it now

Launchpad Janitor (janitor) wrote :

[Expired for util-linux (Ubuntu) because there has been no activity for 60 days.]

Changed in util-linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers