Ubuntu, etc:
sudo apt-get install cifs-utils
ArchLinux:
sudo pacman -S smbclient
The FSTAB, or File System Table defines what is mounted where in linux. The following setup mounts two network shares:
sudo gedit /etc/fstab
#Section Below Mounts NAS Drives //192.168.1.65/GoFlex\040Home\040Public /home/rich/NAS_Public cifs gid=100,credentials=/home/rich/.smbcredentials,sec=ntlm,rw,dir_mode=0775,file_mode=0775 0 0 //192.168.1.65/GoFlex\040Home\040Personal /home/rich/NAS_Rich cifs gid=100,credentials=/home/rich/.smbcredentials,sec=ntlm,rw,dir_mode=0775,file_mode=0775 0 0
Systems that boot quickly sometimes mount entries from fstab prior to the network being “up.” In order to make sure the network is up before you fstab is run, run the following command:
sudo systemctl enable systemd-networkd-wait-online.service
When running OSMC, the above method doesn't seem to be sufficient. If this does not fix mounting errors, try adding the following options to the FSTAB line:
x-systemd.automount,noauto
My understanding is that these options do the following:
Here's what a final line should look like:
//192.168.1.65/GoFlex\040Home\040Public /home/osmc/NAS_Public cifs gid=100,credentials=/home/osmc/.smbcredentials,noauto,x-systemd.automount,sec=ntlm,rw,dir_mode=0775,file_mode=0775 0 0
Browse to /home/pi/.xbmc/userdata/sources.xml
Sources should look like this:
<source> <name>Nameithowyouwant</name> <path pathversion="1">smb://username:pwd@yournasip/yoursharename/folderyouwant</path> </source>
To map a network drive:
To save credentials for automatic login:
These instructions are for ArchLinux
[global] server string = Seedbox Server workgroup = WORKGROUP security = user map to guest = Bad User guest ok = yes guest account = nobody printing = bsd printcap name = /dev/null [public] path=/home/admin/Downloads public = yes writable = yes create mask = 0775 directory mask = 0775