Article 52PRK mount.cifs and /etc/fstab is convoluted. Can I simplify this?

mount.cifs and /etc/fstab is convoluted. Can I simplify this?

by
lindzay
from LinuxQuestions.org on (#52PRK)
mount.cifs and /etc/fstab is convoluted. Can I simplify this?

Anyone know a way around the mount.cifs needing an entry in /etc/fstab for every remote maybe wanted just so so the local mount-point is identified?

I am using Linux Mint 19.3 ... I read mount.cifs works differently than some other distributions.

I have a remote server farm and want to connect my /home/../DOWNLOAD to one of these remote disks - just one of many.

If my /etc/fstab has an entry
//192.168.1.150/u41disk/DOWNLOAD.41 /home/lindzay/XConnect/DOWNLOAD cifs credentials=/home/lindzay/XConnect/credentials,noauto,rw,users 0 0
Then I can successfully do
mount.cifs -o credentials=/home/lindzay/XConnect/credentials \
//192.168.1.150/u41disk/DOWNLOAD.41 \
/home/lindzay/XConnect/DOWNLOAD
...
umount /home/lindzay/XConnect/DOWNLOAD
NOTES:
  • The mount.cifs MUST use -o otherwise the mount will be done; but NO FILES are displayed or accessable
  • The ../credentials file MUST be named in both the /etc/fstab file AND the mount.cifs command.
  • The /etc/fstab items cannot (understandably) use $HOME; however the mount.cifs can use $HOME
  • I have a bash script to select the wanted remote (EG: 41) and am willing to include the sudo password in the script.
  • I successfully used sshfs - but I am after WiFi speed, not security encryption.
  • I tried sudo -S <<<password mount.cifs ... but that's still a user-mount which need the /etc/fstab entry.
I don't mind naming each user in each pc's fstab; but each user + all remote directories is expanding and complicating.latest?d=yIl2AUoC8zA latest?i=XHHw6ExrGqs:a0jOUfxvy6I:F7zBnMy latest?i=XHHw6ExrGqs:a0jOUfxvy6I:V_sGLiP latest?d=qj6IDK7rITs latest?i=XHHw6ExrGqs:a0jOUfxvy6I:gIN9vFwXHHw6ExrGqs
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments