Ubuntu 18.04 LTS : Mount CIFS On Boot











up vote
0
down vote

favorite












I am new to Ubuntu and just only started using it. So please be specific if you are able to help me with my issue.



I am trying to automount my Netgear ReadyNAS shared drive which is using SMB1. I am aware of the security risk but there is nothing I can do as that is the only supported version.



Anyway, I am able to mount the shared drive using the following command:




sudo mount -t cifs -o username=MyUsername -o password=MyPassword -o
vers=1.0 //192.168.0.34/Family_Medias /mnt/NAS-Media/




However, when I reboot the machine, the mounted folder is no longer mounted. My question is based on the above mount command, how do I add into /etc/fstab?



Please note that I had to add the option vers=1.0 or I will get the error "Host is down" due to the fact that my NAS device only supports SMB1. Thanks for any help you can provide me.










share|improve this question






















  • //192.168.0.34/Family_Medias /mnt/NAS-Media/ cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0 (the sec= option may not be needed, I found I needed it on some boxes)
    – guiverc
    Dec 2 at 1:52















up vote
0
down vote

favorite












I am new to Ubuntu and just only started using it. So please be specific if you are able to help me with my issue.



I am trying to automount my Netgear ReadyNAS shared drive which is using SMB1. I am aware of the security risk but there is nothing I can do as that is the only supported version.



Anyway, I am able to mount the shared drive using the following command:




sudo mount -t cifs -o username=MyUsername -o password=MyPassword -o
vers=1.0 //192.168.0.34/Family_Medias /mnt/NAS-Media/




However, when I reboot the machine, the mounted folder is no longer mounted. My question is based on the above mount command, how do I add into /etc/fstab?



Please note that I had to add the option vers=1.0 or I will get the error "Host is down" due to the fact that my NAS device only supports SMB1. Thanks for any help you can provide me.










share|improve this question






















  • //192.168.0.34/Family_Medias /mnt/NAS-Media/ cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0 (the sec= option may not be needed, I found I needed it on some boxes)
    – guiverc
    Dec 2 at 1:52













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am new to Ubuntu and just only started using it. So please be specific if you are able to help me with my issue.



I am trying to automount my Netgear ReadyNAS shared drive which is using SMB1. I am aware of the security risk but there is nothing I can do as that is the only supported version.



Anyway, I am able to mount the shared drive using the following command:




sudo mount -t cifs -o username=MyUsername -o password=MyPassword -o
vers=1.0 //192.168.0.34/Family_Medias /mnt/NAS-Media/




However, when I reboot the machine, the mounted folder is no longer mounted. My question is based on the above mount command, how do I add into /etc/fstab?



Please note that I had to add the option vers=1.0 or I will get the error "Host is down" due to the fact that my NAS device only supports SMB1. Thanks for any help you can provide me.










share|improve this question













I am new to Ubuntu and just only started using it. So please be specific if you are able to help me with my issue.



I am trying to automount my Netgear ReadyNAS shared drive which is using SMB1. I am aware of the security risk but there is nothing I can do as that is the only supported version.



Anyway, I am able to mount the shared drive using the following command:




sudo mount -t cifs -o username=MyUsername -o password=MyPassword -o
vers=1.0 //192.168.0.34/Family_Medias /mnt/NAS-Media/




However, when I reboot the machine, the mounted folder is no longer mounted. My question is based on the above mount command, how do I add into /etc/fstab?



Please note that I had to add the option vers=1.0 or I will get the error "Host is down" due to the fact that my NAS device only supports SMB1. Thanks for any help you can provide me.







mount automount cifs smb






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 2 at 1:43









Allie Syadiqin

82




82












  • //192.168.0.34/Family_Medias /mnt/NAS-Media/ cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0 (the sec= option may not be needed, I found I needed it on some boxes)
    – guiverc
    Dec 2 at 1:52


















  • //192.168.0.34/Family_Medias /mnt/NAS-Media/ cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0 (the sec= option may not be needed, I found I needed it on some boxes)
    – guiverc
    Dec 2 at 1:52
















//192.168.0.34/Family_Medias /mnt/NAS-Media/ cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0 (the sec= option may not be needed, I found I needed it on some boxes)
– guiverc
Dec 2 at 1:52




//192.168.0.34/Family_Medias /mnt/NAS-Media/ cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0 (the sec= option may not be needed, I found I needed it on some boxes)
– guiverc
Dec 2 at 1:52










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










I use lines in fstab like this



//[my-ip-address]/[my-share] /media/[mount-point] cifs vers=3.0,credentials=[my-login-file],iocharset=utf8,file_mode=0777,dir_mode=0777,uid=[username],gid=[username],nofail 0 0


Once you've edited fstab (make a backup first!) don't reboot yet. Test your work by doing sudo mount -a and fix any errors before you reboot. This prevents breaking your system by an fstab error.






share|improve this answer

















  • 1




    Thank you to both Organic Marble and guiverc for your answers. Its working fine and I was able to read/write to the CIFS shared folder.
    – Allie Syadiqin
    Dec 3 at 3:59


















up vote
1
down vote













//192.168.0.34/Family_Medias /mnt/NAS-Media/    cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0


can be added to your /etc/fstab file



You then create a /etc/samba/passwd_file or whatever you wish to call it with your credentials



username=secret1
password=secret2


the sec= option may not be needed, I found I needed it on some boxes






share|improve this answer





















    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',
    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%2f1097805%2fubuntu-18-04-lts-mount-cifs-on-boot%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    I use lines in fstab like this



    //[my-ip-address]/[my-share] /media/[mount-point] cifs vers=3.0,credentials=[my-login-file],iocharset=utf8,file_mode=0777,dir_mode=0777,uid=[username],gid=[username],nofail 0 0


    Once you've edited fstab (make a backup first!) don't reboot yet. Test your work by doing sudo mount -a and fix any errors before you reboot. This prevents breaking your system by an fstab error.






    share|improve this answer

















    • 1




      Thank you to both Organic Marble and guiverc for your answers. Its working fine and I was able to read/write to the CIFS shared folder.
      – Allie Syadiqin
      Dec 3 at 3:59















    up vote
    1
    down vote



    accepted










    I use lines in fstab like this



    //[my-ip-address]/[my-share] /media/[mount-point] cifs vers=3.0,credentials=[my-login-file],iocharset=utf8,file_mode=0777,dir_mode=0777,uid=[username],gid=[username],nofail 0 0


    Once you've edited fstab (make a backup first!) don't reboot yet. Test your work by doing sudo mount -a and fix any errors before you reboot. This prevents breaking your system by an fstab error.






    share|improve this answer

















    • 1




      Thank you to both Organic Marble and guiverc for your answers. Its working fine and I was able to read/write to the CIFS shared folder.
      – Allie Syadiqin
      Dec 3 at 3:59













    up vote
    1
    down vote



    accepted







    up vote
    1
    down vote



    accepted






    I use lines in fstab like this



    //[my-ip-address]/[my-share] /media/[mount-point] cifs vers=3.0,credentials=[my-login-file],iocharset=utf8,file_mode=0777,dir_mode=0777,uid=[username],gid=[username],nofail 0 0


    Once you've edited fstab (make a backup first!) don't reboot yet. Test your work by doing sudo mount -a and fix any errors before you reboot. This prevents breaking your system by an fstab error.






    share|improve this answer












    I use lines in fstab like this



    //[my-ip-address]/[my-share] /media/[mount-point] cifs vers=3.0,credentials=[my-login-file],iocharset=utf8,file_mode=0777,dir_mode=0777,uid=[username],gid=[username],nofail 0 0


    Once you've edited fstab (make a backup first!) don't reboot yet. Test your work by doing sudo mount -a and fix any errors before you reboot. This prevents breaking your system by an fstab error.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 2 at 1:54









    Organic Marble

    10.6k63357




    10.6k63357








    • 1




      Thank you to both Organic Marble and guiverc for your answers. Its working fine and I was able to read/write to the CIFS shared folder.
      – Allie Syadiqin
      Dec 3 at 3:59














    • 1




      Thank you to both Organic Marble and guiverc for your answers. Its working fine and I was able to read/write to the CIFS shared folder.
      – Allie Syadiqin
      Dec 3 at 3:59








    1




    1




    Thank you to both Organic Marble and guiverc for your answers. Its working fine and I was able to read/write to the CIFS shared folder.
    – Allie Syadiqin
    Dec 3 at 3:59




    Thank you to both Organic Marble and guiverc for your answers. Its working fine and I was able to read/write to the CIFS shared folder.
    – Allie Syadiqin
    Dec 3 at 3:59












    up vote
    1
    down vote













    //192.168.0.34/Family_Medias /mnt/NAS-Media/    cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0


    can be added to your /etc/fstab file



    You then create a /etc/samba/passwd_file or whatever you wish to call it with your credentials



    username=secret1
    password=secret2


    the sec= option may not be needed, I found I needed it on some boxes






    share|improve this answer

























      up vote
      1
      down vote













      //192.168.0.34/Family_Medias /mnt/NAS-Media/    cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0


      can be added to your /etc/fstab file



      You then create a /etc/samba/passwd_file or whatever you wish to call it with your credentials



      username=secret1
      password=secret2


      the sec= option may not be needed, I found I needed it on some boxes






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        //192.168.0.34/Family_Medias /mnt/NAS-Media/    cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0


        can be added to your /etc/fstab file



        You then create a /etc/samba/passwd_file or whatever you wish to call it with your credentials



        username=secret1
        password=secret2


        the sec= option may not be needed, I found I needed it on some boxes






        share|improve this answer












        //192.168.0.34/Family_Medias /mnt/NAS-Media/    cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0


        can be added to your /etc/fstab file



        You then create a /etc/samba/passwd_file or whatever you wish to call it with your credentials



        username=secret1
        password=secret2


        the sec= option may not be needed, I found I needed it on some boxes







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 2 at 1:54









        guiverc

        3,95811522




        3,95811522






























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f1097805%2fubuntu-18-04-lts-mount-cifs-on-boot%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

            Quarter-circle Tiles

            build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

            Mont Emei