How to mount cifs at boot (core)?

Forum Forums Official Releases antiX-21/22 “Grup Yorum” How to mount cifs at boot (core)?

Tagged: , ,

  • This topic has 5 replies, 2 voices, and was last updated Jan 29-4:21 pm by olsztyn.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #98481
    Member
    techore

      antiX 22 runit core

      I am looking for guidance on how to have a cifs share mount at boot.

      Currently, I have an fstab entry and it mounts without issues executing ‘mount -a’, but, it will not mount at boot.

      //192.168.22.10/files /home/useracct/files cifs ro,credentials=/root/.cifscred,uid=useracct,gid=useracct,iocharset=utf8,file_mode=0444,dirmode=0555, 0 0
      

      Recommendations?

      #98484
      Member
      olsztyn
        Helpful
        Up
        0
        ::

        I currently have a bunch of cifs shares on different smb servers defined in fstab to be mounted to particular mount points located in the user’s /home but it is on demand, when needed. Looking at your fstab definition, I am not sure if you plan to mount the share by root by default, not individual user. So if my understanding is correct (I am not sure) than do you plan the cifs share to be readonly for individual user?
        Having asked the above, I would be also interested in knowing exactly how to mount cifs shares as boot time (rather than on demand). This would be just in case I come to such necessity (so far on-demand is my preference, rather than on-boot). So just to know. My initial guess would be to include such share mount operation as part of the session startup procedure but I am not sure…

        Update:
        I think my question results from my lack of understanding of your design of your cifs share access. So what I fail to understand is under what user credentials is such access to cifs share defined on the smb server.
        E.g. I have four separate NAS servers and cifs shares defined with access to user name ‘francis’ on each smb server and particular password corresponding to this user name.
        Now since smb server established username and password is required to access cifs share I do not think if it matters that mapping of such share will be by done under root privilege on antiX or username.
        One way or the other I still do not answer your question how to mount at boot, but I am just interested in the answer someone can provide…
        Thanks and regards…

        • This reply was modified 3 months, 1 week ago by olsztyn.
        • This reply was modified 3 months, 1 week ago by olsztyn.

        Live antiX Boot Options (Previously posted by Xecure):
        https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

        #98487
        Member
        techore
          Helpful
          Up
          0
          ::

          Not the best example, but with systemd I created a unit that would mount cifs and other types of network shares. It worked well for it was configured to wait on the network interface.

          This line of reasoning assumes that the fstab on antiX is not mounting the share due to the network interface not being up and configured.

          I’ll keep digging but any suggestions would be appreciated.

          #98489
          Member
          techore
            Helpful
            Up
            0
            ::

            Found automount-antix on antiX 22 base and see it is using udevil. I don’t believe udevil is being maintain. Is it?

            Attempted to insert “mount -a” in both /etc/rc.local and /etc/network/if-up.d but neither appears to be working. I am definitely thrashing. 🙂

            Sleep then I will take another run at it.

            #98511
            Member
            techore
              Helpful
              Up
              0
              ::

              This has possibilities.

              http://smarden.org/runit/dependencies.html

              #98513
              Member
              olsztyn
                Helpful
                Up
                0
                ::

                This has possibilities.
                http://smarden.org/runit/dependencies.html

                Runit crossed my mind too but am not familiar enough yet how to create a runit service for such task and service in general…

                Live antiX Boot Options (Previously posted by Xecure):
                https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.