I would like to know how can I setup an ubuntu server as a file server. Please note I am aware of using azure files where we can setup a SMB file share. But apart from that, let's say I would like to directly access my ubuntu file share via its hostname. Here is an example to explain my scenario:
- I have created a directory called /shared/documents in my ubuntu server (vmcompass) which I would to share with everyone.
- Created a mount point called /mnt/documents to mount my shared location there.
- Added an entry in /etc/fstab file for auto mount, like below:
//vmcompass.0fsnqam5xj1epfg2z3dnd3keag.tx.internal.cloudapp.net/shared/documents /mnt/documents cifs username=myuser,noauto 0 0
However while mounting the SMB share I am getting the below error. I am not sure what is wrong ?
sudo mount /mnt/documents
Password for myuser@//vmcompass/shared/documents: ********
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)