SlimServer doesn’t like the Music Folder path in the form
smb://computer/share - presumably it can’t use smbclient. I therefore need to mount this share in the filesystem.
sudo apt-get install smbfs
Create a folder in the /media folder:
sudo mkdir /media/mp3
Mount the share manually to test it:
sudo smbmount //computer/MP3 /media/mp3 -o username=USER,password=PASSWORD,uid=1000,mask=000
Note: Change USER to your linux username. The
uid=USER,gid=usersis important because if you dont use that, only root will have access to write files to the mounted share.
sudo smbumount /media/mp3
Add an entry to
/etc/fstabso it is mounted on boot:
sudo gedit /etc/fstab
and add this line at the bottom:
//computer/MP3 /media/mp3 smbfs auto,credentials=/home/USER/.credentials,uid=1000,umask=000,user 0 0
.smbcredentialsfile in the user’s home directory:
sudo gedit ~/.smbcredentials
Add the following lines to the file, but change USER to your SMB username and PASSWORD to your SMB password.
sudo mount -a
NOTE: you could have included the username and password in the fstab but this way is more secure.
NOTE: Do not try and mount a folder on a share, it wont work. The source for an SMB mount has to be a share.
NOTE: Do not put a trailing “/” on the share path or the directory path, it will cause it to fail.
SMB Shares with spaces in the names
If you have an SMB share with a space in the path then replace the space with “
\040” (This only applies to the entry in
/etc/fstab, from the command line you can just enclose the share path in quotes)