1

I can mount a share with this command:

sudo mount -o username=user,password=pass //192.168.5.227/share /mnt/share

And in my fstab I have this line:

//192.168.5.227/share /mnt/share cifs credentials=/path/to/credentials 0 0

and mount -a won't mount it. I have tried this with samba installed but currently it isn't. Same error:

mount: wrong fs type, bad option, bad superblock on //192.168.5.227/share
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail  or so

I have also tried with nfs to no avail.

My question is, if I can't get it working with samba is there a way to do it in fstab without a <type> like cifs?

Any help is appreciated, either in the direction of fixing the samba issue or not using it and mounting via fstab without it.

EDIT - So although strangeman didn't give me the exact answer I was looking for, I am more than happy because the fstab is actually working now. But why doesn't the credentials=/path/to/credential_file work? Is there something weird with this option in fstab that I don't know about? I guess I could ask a new question too. Thanks for any help.

1 Answer 1

2

You need add "-o username=user,password=pass"

//192.168.xxx.xxx/dir  /mnt/dir  cifs  noauto,noperm,guest,iocharset=utf8  0   0

or

//192.168.xxx.xxx/dir  /mnt/dir  cifs  noauto,noperm,username=user,password=pass,iocharset=utf8  0   0
4
  • That's already in my credentials file (see above). Plus, I also tried that and it gave the same error. Commented Jan 25, 2012 at 0:56
  • Hm... What say "dmesg | tail"?
    – strangeman
    Commented Jan 25, 2012 at 0:59
  • [178319.972284] CIFS VFS: cifs_mount failed w/return code = -13 Commented Feb 10, 2012 at 21:41
  • So your method worked. Not sure why it didn't before, but after some restarts and rewriting lines, it's working. Thanks. Now to get the credentials file to work ;--) Commented Feb 10, 2012 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .