So I have been given this LINK: \\HDD01101円_Presentaion06円_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 ?
-
try here raspberrypi.stackexchange.com/questions/40974/…rob– rob2018年06月20日 14:55:22 +00:00Commented Jun 20, 2018 at 14:55
2 Answers 2
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.
-
1You should set
chmod 600 /home/pi/.smbcred
. Don't know, but network filesystemcifs
is available by default?Ingo– Ingo2018年06月20日 18:53:29 +00:00Commented Jun 20, 2018 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– Johan2018年06月21日 06:19:35 +00:00Commented Jun 21, 2018 at 6:19
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.