1

I have one server that is mounting with fstab using a credentials file. The credentials file (.Smbcredentials) code is :

username=my_windows_login
password=my_password
domain=my_domain

My code in fstab is:

//myshare/myfolder /mnt/backup cifs credentials=/home/mydirectory/.Smbcredentials

This works perfectly. However, when trying to duplicate this on another server (same version) I get

mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

I'm running as root, all the folder permissions are identical.....everything is identical. Yet I get error 13 on the new server only. What could be wrong?

Pickle
  • 91
  • 1
  • 3
  • 10

3 Answers3

1

You need to add 'users' into the fstab options:

//myshare/myfolder /mnt/backup cifs users,credentials=/home/mydirectory/.Smbcredentials 0 0
Jonas Bjork
  • 376
  • 1
  • 4
0

From the Ubuntu wiki page, try adding a few of the missing params and make sure your cred file is 600: https://wiki.ubuntu.com/MountWindowsSharesPermanently

chmod 600 ~/.Smbcredentials

fstab line:

//myshare/myfolder /mnt/backup cifs credentials=/home/mydirectory/.Smbcredentials,iocharset=utf8,sec=ntlm 0 0 

EDIT:

Have you tried outside of fstab to get this mounted? Maybe using the mount command would give you some more usable output

mount -t cifs -o username=USERNAME,password=PASSWD //myshare/myfolder /mnt/backup
Chris Montanaro
  • 808
  • 1
  • 7
  • 8
0

Tried using sudo to mount?

I was under the impression that /mnt/ was not writable by regular users.

ie: sudo mount /mnt/backup

Also, make sure that your fstab entry includes 0 0 at the end.

Justin
  • 167
  • 1
  • 3
  • 12
  • you are correct that normal users cannot just mount devices. however i think he is trying this in fstab which should be used under the root account at boot. – SnakeDoc Jan 24 '14 at 01:54
  • Correct, I am doing this under root. I have also tried adding 00 to the fstab but it did not fix it. – Pickle Jan 24 '14 at 14:06
  • the space in between the zeros is very important, btw. – Justin Jan 25 '14 at 00:27
  • I assume that there is a reason why you don't want your plaintext password in the fstab file. if not, you can replace `credentials=/home/mydirectory/.Smbcredentials` with `username=user,password=password,domain=domain` – Justin Jan 25 '14 at 00:29