Auto Mount SDcard as a network share












0















Hy there, im new in the linux world so i apologize in advance for my dumb question. Is there any easy way to auto mount my SD-card as a network share? I am using a NUC NUC8i5BEH2 as Plex server and there is no monitor connected to the unit.



Thank you!










share|improve this question



























    0















    Hy there, im new in the linux world so i apologize in advance for my dumb question. Is there any easy way to auto mount my SD-card as a network share? I am using a NUC NUC8i5BEH2 as Plex server and there is no monitor connected to the unit.



    Thank you!










    share|improve this question

























      0












      0








      0








      Hy there, im new in the linux world so i apologize in advance for my dumb question. Is there any easy way to auto mount my SD-card as a network share? I am using a NUC NUC8i5BEH2 as Plex server and there is no monitor connected to the unit.



      Thank you!










      share|improve this question














      Hy there, im new in the linux world so i apologize in advance for my dumb question. Is there any easy way to auto mount my SD-card as a network share? I am using a NUC NUC8i5BEH2 as Plex server and there is no monitor connected to the unit.



      Thank you!







      automount sd-card shared-folders






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 31 at 6:41









      HunorHunor

      1




      1






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I did with a samba share in the past, so assuming you already have a samba server properly setup, if not you can use this guide, proceed installing cifs-utils:



          sudo apt-get install cifs-utils



          And add your entry in /etc/fstab filling with your paramenters:



          //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0



          Create the .smbcredentials file in your home directory:



          username=<your-user-share>
          password=<your-pass>
          domain=<domain-name>



          secure your ~/.smbcredentials file:



          chmod 0600 ~/.smbcredentials



          test with:



          sudo mount -a



          this should work at boot time as well






          share|improve this answer
























          • The samba is working, i have made a folder in /mnt/sdshare with the folowing settings(i want this to be public on my network) [testshare] path = /mnt/sdshare writeable = yes browseable = yes public = yes create mask = 0644 directory mask = 0755 force user = shareuser now i can access the folder from the pc, now i dont understand the folowing //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0 where to specify to auto mount the sd-card to the shared folder?

            – Hunor
            Feb 2 at 13:06













          • Maybe an example could help, in your fstab you should add a line like this adapting the ip, dir name,...: //192.168.0.51/storage /media/myname/Public/ cifs username=YOURUSERNAME,password=YOURPASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 using directly your credentials instead of a file. Let me know if it's clearer and if works.

            – Alex Barchiesi
            Feb 2 at 15:37













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1114300%2fauto-mount-sdcard-as-a-network-share%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I did with a samba share in the past, so assuming you already have a samba server properly setup, if not you can use this guide, proceed installing cifs-utils:



          sudo apt-get install cifs-utils



          And add your entry in /etc/fstab filling with your paramenters:



          //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0



          Create the .smbcredentials file in your home directory:



          username=<your-user-share>
          password=<your-pass>
          domain=<domain-name>



          secure your ~/.smbcredentials file:



          chmod 0600 ~/.smbcredentials



          test with:



          sudo mount -a



          this should work at boot time as well






          share|improve this answer
























          • The samba is working, i have made a folder in /mnt/sdshare with the folowing settings(i want this to be public on my network) [testshare] path = /mnt/sdshare writeable = yes browseable = yes public = yes create mask = 0644 directory mask = 0755 force user = shareuser now i can access the folder from the pc, now i dont understand the folowing //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0 where to specify to auto mount the sd-card to the shared folder?

            – Hunor
            Feb 2 at 13:06













          • Maybe an example could help, in your fstab you should add a line like this adapting the ip, dir name,...: //192.168.0.51/storage /media/myname/Public/ cifs username=YOURUSERNAME,password=YOURPASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 using directly your credentials instead of a file. Let me know if it's clearer and if works.

            – Alex Barchiesi
            Feb 2 at 15:37


















          0














          I did with a samba share in the past, so assuming you already have a samba server properly setup, if not you can use this guide, proceed installing cifs-utils:



          sudo apt-get install cifs-utils



          And add your entry in /etc/fstab filling with your paramenters:



          //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0



          Create the .smbcredentials file in your home directory:



          username=<your-user-share>
          password=<your-pass>
          domain=<domain-name>



          secure your ~/.smbcredentials file:



          chmod 0600 ~/.smbcredentials



          test with:



          sudo mount -a



          this should work at boot time as well






          share|improve this answer
























          • The samba is working, i have made a folder in /mnt/sdshare with the folowing settings(i want this to be public on my network) [testshare] path = /mnt/sdshare writeable = yes browseable = yes public = yes create mask = 0644 directory mask = 0755 force user = shareuser now i can access the folder from the pc, now i dont understand the folowing //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0 where to specify to auto mount the sd-card to the shared folder?

            – Hunor
            Feb 2 at 13:06













          • Maybe an example could help, in your fstab you should add a line like this adapting the ip, dir name,...: //192.168.0.51/storage /media/myname/Public/ cifs username=YOURUSERNAME,password=YOURPASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 using directly your credentials instead of a file. Let me know if it's clearer and if works.

            – Alex Barchiesi
            Feb 2 at 15:37
















          0












          0








          0







          I did with a samba share in the past, so assuming you already have a samba server properly setup, if not you can use this guide, proceed installing cifs-utils:



          sudo apt-get install cifs-utils



          And add your entry in /etc/fstab filling with your paramenters:



          //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0



          Create the .smbcredentials file in your home directory:



          username=<your-user-share>
          password=<your-pass>
          domain=<domain-name>



          secure your ~/.smbcredentials file:



          chmod 0600 ~/.smbcredentials



          test with:



          sudo mount -a



          this should work at boot time as well






          share|improve this answer













          I did with a samba share in the past, so assuming you already have a samba server properly setup, if not you can use this guide, proceed installing cifs-utils:



          sudo apt-get install cifs-utils



          And add your entry in /etc/fstab filling with your paramenters:



          //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0



          Create the .smbcredentials file in your home directory:



          username=<your-user-share>
          password=<your-pass>
          domain=<domain-name>



          secure your ~/.smbcredentials file:



          chmod 0600 ~/.smbcredentials



          test with:



          sudo mount -a



          this should work at boot time as well







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 31 at 11:30









          Alex BarchiesiAlex Barchiesi

          926




          926













          • The samba is working, i have made a folder in /mnt/sdshare with the folowing settings(i want this to be public on my network) [testshare] path = /mnt/sdshare writeable = yes browseable = yes public = yes create mask = 0644 directory mask = 0755 force user = shareuser now i can access the folder from the pc, now i dont understand the folowing //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0 where to specify to auto mount the sd-card to the shared folder?

            – Hunor
            Feb 2 at 13:06













          • Maybe an example could help, in your fstab you should add a line like this adapting the ip, dir name,...: //192.168.0.51/storage /media/myname/Public/ cifs username=YOURUSERNAME,password=YOURPASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 using directly your credentials instead of a file. Let me know if it's clearer and if works.

            – Alex Barchiesi
            Feb 2 at 15:37





















          • The samba is working, i have made a folder in /mnt/sdshare with the folowing settings(i want this to be public on my network) [testshare] path = /mnt/sdshare writeable = yes browseable = yes public = yes create mask = 0644 directory mask = 0755 force user = shareuser now i can access the folder from the pc, now i dont understand the folowing //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0 where to specify to auto mount the sd-card to the shared folder?

            – Hunor
            Feb 2 at 13:06













          • Maybe an example could help, in your fstab you should add a line like this adapting the ip, dir name,...: //192.168.0.51/storage /media/myname/Public/ cifs username=YOURUSERNAME,password=YOURPASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 using directly your credentials instead of a file. Let me know if it's clearer and if works.

            – Alex Barchiesi
            Feb 2 at 15:37



















          The samba is working, i have made a folder in /mnt/sdshare with the folowing settings(i want this to be public on my network) [testshare] path = /mnt/sdshare writeable = yes browseable = yes public = yes create mask = 0644 directory mask = 0755 force user = shareuser now i can access the folder from the pc, now i dont understand the folowing //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0 where to specify to auto mount the sd-card to the shared folder?

          – Hunor
          Feb 2 at 13:06







          The samba is working, i have made a folder in /mnt/sdshare with the folowing settings(i want this to be public on my network) [testshare] path = /mnt/sdshare writeable = yes browseable = yes public = yes create mask = 0644 directory mask = 0755 force user = shareuser now i can access the folder from the pc, now i dont understand the folowing //server-ip/share-dir /path-to/mount-point cifs credentials=/home/user/.smbcredentials,uid=shareuser,gid=sharegroup 0 0 where to specify to auto mount the sd-card to the shared folder?

          – Hunor
          Feb 2 at 13:06















          Maybe an example could help, in your fstab you should add a line like this adapting the ip, dir name,...: //192.168.0.51/storage /media/myname/Public/ cifs username=YOURUSERNAME,password=YOURPASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 using directly your credentials instead of a file. Let me know if it's clearer and if works.

          – Alex Barchiesi
          Feb 2 at 15:37







          Maybe an example could help, in your fstab you should add a line like this adapting the ip, dir name,...: //192.168.0.51/storage /media/myname/Public/ cifs username=YOURUSERNAME,password=YOURPASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 using directly your credentials instead of a file. Let me know if it's clearer and if works.

          – Alex Barchiesi
          Feb 2 at 15:37




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1114300%2fauto-mount-sdcard-as-a-network-share%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Human spaceflight

          Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

          張江高科駅