PDA

View Full Version : mount -t cifs using credentials file doesn't work??


tvh
October 20th, 2005, 02:35 PM
Is this a bug, my n00bish fault or something else?

I cannot mount a samba share using a credentials file, like this:

mount -t cifs -o credentials=/home/foo/.smbpwd //server/share /home/foo/files

credential file /home/foo/.smbpwd is
username=foo
password=plaintext

and the error in syslog is CIFS VFS: No username specified
[4295079.940000] CIFS VFS: cifs_mount failed w/return code = -22


But I can mount the share by passing the username and password in the command line:
mount -t cifs -o user=foo,password=plaintext //server/share /home/user/files
Actually, I cannot mount a share without passing the password on the command line. I read on the manpage that if no password is passed, mount command should ask for it. I get the same error than above if no password is passed on the command line.

Any ideas?

tvh
October 21st, 2005, 10:58 AM
Problem solved!

mount.cifs was not installed. I had to compile it from samba sources and mv to /sbin. After that all the problems were gone.

exobuzz
October 23rd, 2005, 09:16 PM
easier to type

apt-get install smbfs

(which contains your mount.cifs) :)

tigon5
February 15th, 2008, 05:08 AM
I had the same problem in a fresh install of Gutsy - problem solved with above solution.

surely mount shouldn't accept the -t cifs option without complaining that mount.cifs isn't installed - seems stupid to me!