finchy505
May 8th, 2017, 03:01 PM
Hi guys
I have a shared network folder on my Qnap NAS that I need to be mapped to my Lubuntu PC, and for it to auto connect to it on start up (regardless of whether a user is logged in). What is the best way to do it?
I tried using RPCBind, which seemed to work initially but after a reboot it no longer seems to be mapped to that network share.
This was how I did it.....
$ mkdir NAS
$ sudo apt-get install nfs-kernel-server rpcbind nfs-common
$ sudo update-rc.d rpcbind enable
$ sudo cp /etc/fstab /etc/fstab.backup
$ sudo leafpad /etc/fstab
This will open up fstab in Leafpad. Add this to the bottom with NAS IP address at x.x.x.x, NAS share at yyyy, zzz is the name of the network share (NAS) and wwww is either nfs or cifs;
//x.x.x.x/yyyy /home/<username>/zzz wwww guest,uid=<username>,gid.<username>,nobrl,noauto,x-systemd.automount 0 0
//192.168.0.10/network-share /home/finchy/NAS nfs guest,uid=finchy,gid.finchy,nobrl,noauto,x-systemd.automount 0 0
Is there a better way to do it so it connects and stays connected as a mapped drive?
Thanks
I have a shared network folder on my Qnap NAS that I need to be mapped to my Lubuntu PC, and for it to auto connect to it on start up (regardless of whether a user is logged in). What is the best way to do it?
I tried using RPCBind, which seemed to work initially but after a reboot it no longer seems to be mapped to that network share.
This was how I did it.....
$ mkdir NAS
$ sudo apt-get install nfs-kernel-server rpcbind nfs-common
$ sudo update-rc.d rpcbind enable
$ sudo cp /etc/fstab /etc/fstab.backup
$ sudo leafpad /etc/fstab
This will open up fstab in Leafpad. Add this to the bottom with NAS IP address at x.x.x.x, NAS share at yyyy, zzz is the name of the network share (NAS) and wwww is either nfs or cifs;
//x.x.x.x/yyyy /home/<username>/zzz wwww guest,uid=<username>,gid.<username>,nobrl,noauto,x-systemd.automount 0 0
//192.168.0.10/network-share /home/finchy/NAS nfs guest,uid=finchy,gid.finchy,nobrl,noauto,x-systemd.automount 0 0
Is there a better way to do it so it connects and stays connected as a mapped drive?
Thanks