1

Trying to mount a CIFS share (from Freenas) at boot, but I can't seem to get it to work.

//freenas/mast/ /media/plexshare cifs guest,uid=1000 iocharset=utf8 0 0

I've tried using an IP rather than 'freenas' but that doesn't help

What's weird is that this worked twice, then on the third reboot, stopped working, and now won't mount with

sudo mount -a

It just returns :

mount: /etc/fstab: parse error: ignore entry at line 13

I can access the share perfectly when browsing the network through the file manager. The path when accessing it that way is: smb://freenas.local/mast/ I've also tried adding the .local to the line in fstab, but again to no avail.

3

I see an issue but it may just be a misprint ..

the line should be :

//freenas/mast/ /media/plexshare cifs guest,uid=1000,iocharset=utf8 0 0

you have a space after uid and iocharset and it should be a comma

As you mentioned you are getting an error about only being able to mount as root. I also suggested trying

//freenas/mast/ /media/plexshare cifs defaults 0 0

If that doesn't help I can tell you the way I was able to get a network share drive to automount.

first you need to create a file in your users home directory

open terminal ... it should be at the users home directory

touch .smbcredentials

then

sudo chmod 600 .smbcredentials

open the file and add the following information

username=<user name needed to access the share>
password=<password needed to access the share>

once you have that file in place you will need to change or add the line to your etc/fstab at the end after all other lines.

//freenas/mast/ /media/plexshare cifs credentials=/home/<username>/.smbcredentials,iocharset=utf8,sec=ntlm 0 0

This should allow it to login and mount correctly to the share.

  • Thank! I don't know how I missed that, or how it managed to work before! – Ross Fleming May 10 '16 at 15:43
  • Although now, I'm getting an error saying that 'only root can mount //freenas/mast/ on /media/plexshare – Ross Fleming May 10 '16 at 15:43
  • do you really need those settings you are passing .. or can you just use defaults //freenas/mast/ /media/plexshare cifs defaults 0 0 – John Orion May 10 '16 at 15:59
  • I updated my answer – John Orion May 10 '16 at 16:20
  • Thanks, added an answer detailing what was wrong. Thanks for picking up on my typos too. – Ross Fleming May 14 '16 at 12:59
1

Managed to figure it out.

The 'only root can mount //freenas/mast/ on /media/plexshare' issue I was getting was because I was trying to mount using the gui in the file manager, using 'sudo mount -a' or adding users to the fstab options fixed this.

I was then getting a mount error 115. I fixed this simply by replacing 'freenas' with the IP of the machine again.

It has been working fine since.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.