If you have any trailing spaces or a carriage return because you created it in, or copied it from a Windows PC then the file will not work. Note that the credentials in this file are read from the equals sign to a line feed. smbcredentials) Create this file in the osmc home, so using nano: nano ~/.smbcredentials This is what a credentials file should look like. We suggest the usage of a “credentials” file for security reasons. Some setups may require vers=3.1.1 to be used instead (possibly Synology users). You may have to add an additional parameter to your /etc/, namely vers=3.0 to enforce the usage of SMB version 3 especially if you have connection issues with Windows 10. This is true for all of the following examples also.] The mounts will not automatically be unmounted if the mount point ends with a /. [ EDIT : Make sure that the mount point (/mnt/… does not end with a / )įor example, /mnt/server/share1/ will cause problems with autofs. mnt// -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc :/// Next you need to create a map to the share: sudo nano /etc/Īnd add /mnt// -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc :/// (Don’t forget to save the file: CTRL-O ENTER CTRL-X) Just a plain \ before the space is all that’s needed.įor SMB shares sudo nano /etc/auto.masterĪnd add to the end of the file: /- /etc/ -timeout 15 browse If you are migrating from using fstab, you were used to replacing spaces with \040.For example /mnt/My Files should be /mnt/My\ Files If you have spaces in the name, then you need a \ before the space.For example if your server is MyServer, then /mnt/ would become /mnt/MyServer When you see an item surrounded by do not include the in your file.Important notes to read before proceeding If you already have mounted your shares already via fstab comment out that line in fstab and reboot.įor this how-to we are going to use a directory for each server, if you want to replicate your existing folder structure that can also be done.Īutofs will create any mountpoints required, so you do not need to create them Autofs should be as performant as fstab based mounting but has the advantage that your shares are mounted on demand which also should give you more reliability in case of network interuptions.įirst install the autofs package sudo apt-get install autofs This how-to describes how to mount your network shares via autofs.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |