0

I want to try and mount a smb shared network drive on boot. The following command works for me when I put it in a terminal.

sudo mount -t cifs -o -credentials=/home/pi/.smbcredentials,vers=3.0,uid=1000,gid=1000 //192.168.1.129/SecurityVideos/ /media/share/

I tried puting in that command into a startup script but it dosent execute. So I tried to follow this post: Proper fstab entry to mount a samba share on boot? but it is not working for me.

I added this entry to my /etc/fstab/ file but it still does not mount on boot.

//192.168.1.129/SecurityVideos /media/share/ cifs credentials=/home/pi/.smbcredentials,vers=3.0,uid=1000,gid=1000 0 0

What am I missing/doing wrong?

2

I don't think you are doing anything wrong.

Most likely the instructions in fstab are being executed before the network stack is up and operational on your client and there is nothing to mount at that point.

You might try something that's all the rage these days and that's a systemd automount. Add the following options to your fstab entry: noauto,x-systemd.automount so that it looks like this:

//192.168.1.129/SecurityVideos /media/share/ cifs credentials=/home/pi/.smbcredentials,vers=3.0,uid=1000,gid=1000,noauto,x-systemd.automount 0 0
  • Yay! its working now, you sir are the winrar, thanks again :D – Katianie Apr 4 at 14:47

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.