argument "credentials=..." doesn't work any more in fstab

Bug #48997 reported by Dietmar Winkler
4
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: mount

Hi,

I just converted my Breezy machine into a "dapper". Unfortunately I'm not able to use my old fstab as it was for mounting windows shares. In Breezy it was possible to put the account data of a windows share in a file (e.g. "accdata" which can be kept save) with the content

username=<username>
password=<password>

the entry of my fstab looks like this:

//Server/Share /mnt/Winshare cifs iocharset=utf8,user,credentials=/path/to/accdata,uid=imexil,gid=imexil,auto 0 0

This worked fine in breezy. However in Dapper it won't and I have to provide the username and password in clear text in the fstab like this:

//Server/Share /mnt/Winshare cifs iocharset=utf8,user,username=<username>,password=<password>,uid=imexil,gid=imexil,auto 0 0

So I guess this must be a bug of mount.cifs

Revision history for this message
Matt Zimmerman (mdz) wrote :

mount.cifs is in the samba package; reassigning.

Please explain in what way it doesn't work, including exact copies of any error messages.

Changed in util-linux:
importance: Untriaged → Medium
status: Unconfirmed → Needs Info
Revision history for this message
Ian Jackson (ijackson) wrote :

I diffed the relevant bits of the samba source and nothing relevant appears to have changed between breezy and dapper. It is likely that the symptoms are caused by something else.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Perhaps the file isn't accessible at the point in the boot process when the filesystem is mounted?

Revision history for this message
Dietmar Winkler (dietmarw) wrote :

The credential file is accessible I've just repeated the mount in two ways:

First with fstab looking like this:
//Server/Share /mnt/Share cifs iocharset=utf8,user,username=dietmarw,password=password,uid=dietmarw,gid=dietmarw,auto 0 0

This works fine.

Second with fstab looking like this:
//Server/Share /mnt/Share cifs iocharset=utf8,user,credentials=/home/dietmarw/.smb/myacc,uid=dietmarw,gid=dietmarw,auto 0 0

This gives:
root@HeX:/etc# mount /mnt/ForschungMDT/
mount: wrong fs type, bad option, bad superblock on //130.149.48.9/ForschungMDT, missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

So dmesg shows:
[18802744.064000] CIFS VFS: No username specified
[18802744.064000] CIFS VFS: cifs_mount failed w/return code = -22

But the credential file is setup conforming to the manual (and worked on breezy as is) and looks like this:

username=dietmarw
password=password

This actually happend to collegue of mine in the exact same way after he had upgraded from breezy to dapper.

Revision history for this message
Vipul Delwadia (vipul-delwadia) wrote :

I can confirm this for edgy as well, I currently do not have access to the machine but I can post the exact error output if needed.

Vipul

Revision history for this message
Serge van Ginderachter (svg) wrote : Re: [Bug 48997] Re: argument "credentials=..." doesn't work any more in fstab

I confirm this behaviour - in Edgy, don't have a Dapper to check - when
mount as fs type 'cifs'. But it works using 'smbfs'. As I still used fs
type 'smbfs' I didn't notice any problem, until now when I tested for
this bug now.

===
serge@cyberlab:~$ sudo mount /home/serge/Network/SERGE/
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
# changing back to smbfs
serge@cyberlab:~$ sudo vi /etc/fstab
serge@cyberlab:~$ sudo mount /home/serge/Network/SERGE/
===

Server is a Debian Sarge default Samba daemon. I'm not sure to what the
difference is with smbfs & cifs.

        Serge

--
Serge van Ginderachter http://www.vanginderachter.be/

On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question. -- Charles
Babbage (1791-1871)

Revision history for this message
Dietmar Winkler (dietmarw) wrote :

Changed to confirmed since Serge had the same problem on Edgy.

Changed in samba:
status: Needs Info → Confirmed
Revision history for this message
Sridhar Dhanapalan (sridhar) wrote :

I am using Edgy and this problem does not exist for me. I have cifs mounts that use credentials files listed in /etc/fstab.

Revision history for this message
Dietmar Winkler (dietmarw) wrote :

Triggered by the last comment I did a bit more testing and searching the web and found finally the solution for the problem here: http://ubuntuforums.org/archive/index.php/t-79612.html

It was simply the missing package 'smbfs'. After installing it everything works fine and this bug can finally be closed.

Revision history for this message
Dietmar Winkler (dietmarw) wrote :

'sudo apt-get install smbfs' solves this issue.

Changed in samba:
status: Confirmed → Fix Committed
Revision history for this message
Mathias Gug (mathiaz) wrote :

Closing this bug as mentioned by the reporter.

The credentials option works in dapper.

Changed in samba:
status: Fix Committed → Invalid
Revision history for this message
dah bien-hwa (dahbien-hwa) wrote :

Hm now got this "bug" on a 12.04. Why is CIFS saying it doesn't find a username, when in fact it doesn't find needed binaries? In my opinion, the log output is wrong, so there is a bug there (although it is a minor one).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.