Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
# Mount NFS drive for Plex serveradmin
192.168.0.5:/volume1/guest.public /opt/mnt/guest.public/ nfs4

Working System Example

And this is now my working system looked,

Make directories in a my own data folder as my normal user,

Code Block
languagebash
cd /data/
mkdir guest.public myra pham tin.archive rsync pham.encrypted

Get the uid and gui of your account which in my case is uid=2000 and gid=50

Code Block
languagebash
cat /etc/passwd | grep 2000
tin.pham:x:2000:50:Support Tin Pham:/home/tin.pham:/bin/bash

/etc/fstab file ended up looking.. I'm using a more privileged account here, but have specified to mount using ro = read only. Thegid= and  uid=,

Code Block
languagebash
//192.168.0.5/guest.public /data/guest.public/ cifs uid=2000,gid=50,credentials=/root/.cifscredentials,ro 0 0
//192.168.0.5/myra /data/myra/ cifs uid=2000,gid=50,credentials=/root/.cifscredentials,ro 0 0
//192.168.0.5/pham /data/pham/ cifs uid=2000,gid=50,credentials=/root/.cifscredentials,ro 0 0
//192.168.0.5/tin.archive /data/tin.archive/ cifs uid=2000,gid=50,credentials=/root/.cifscredentials,ro 0 0
//192.168.0.5/rsync /data/rsync/ cifs uid=2000,gid=50,credentials=/root/.cifscredentials,ro 0 0
//192.168.0.5/pham.encrypted /data/pham.encrypted/ cifs uid=2000,gid=50,credentials=/root/.cifscredentials,ro 0 0

Reboot and if all things work those directories will now be mounted with the NAS data.

References

Automount network drive on startup - https://ubuntuforums.org/showthread.php?t=1806455

...