1

So I have been given this LINK: \\HDD011\01_Presentaion\06_New_1 .

I know this link is from a network shared drive here at my job.

As a side project, I've been asked to make this link available to our Raspberry Pi(that runs on Raspbian) on our wall for some presentation to run there. I have read that samba should be able to do just what I need but I don't really know how to implement it.

So how can I make this link available there all the time ? What options do I have ?

Johan
  • 11
  • 1
  • 3
  • try here https://raspberrypi.stackexchange.com/questions/40974/access-network-samba-share-from-pi-client – rob Jun 20 '18 at 14:55

2 Answers2

3

Create a mountpoint for your share:

sudo mkdir /media/winshare
sudo chown pi:pi /media/winshare

Create a smbcred file:

nano /home/pi/.smbcred

Write the following into it (replace username and password) :

username=username
password=paswword

Save (CTRL-O) and exit (CTRL-X).

The dot at the beginning of the filename indicates a hidden file. Hidden files can be shown with

 ls -la 

Finally add following line to /etc/fstab:

//HDD011/01_Presentaion/06_New_1 /media/winshare cifs x-systemd.automount,users,credentials=/home/pi/.smbcred 0 0

/media/winshare will appear as regular folder and you can now read and write to it.

flakeshake
  • 6,235
  • 1
  • 14
  • 33
  • 1
    You should set chmod 600 /home/pi/.smbcred. Don't know, but network filesystem cifs is available by default? – Ingo Jun 20 '18 at 18:53
  • Thanks you for the answer. When I add the line to /etc/fstab I get this error : -bash: //HDD011/01_Presentaion/06_New_1: No such file or directory' – Johan Jun 21 '18 at 06:19
0

If you don't want the changes to be permanent you can use

sudo mount -t cifs //HDD011/01_Presentaion/06_New_1 /media/winshare -o username=share_username,iocharset=utf8,file_mode=0777,dir_mode=0777

where share_username is the username that you have to use to sign in.