[SOLVED] Connect Shares

Forum Forums General Software [SOLVED] Connect Shares

  • This topic has 3 replies, 2 voices, and was last updated Oct 30-3:48 pm by dolphin_oracle.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12851
    Anonymous

      Does anybody understands how “Connect Shares” works and could somebody please help me to successfully connect something over it, at least once in my life? πŸ™‚

      Since the examples are always the easiest way to understand, I shell make an imaginary environment first, before I ask my question.

      Let’s imagine one Windows 10 Home machine with working SMB (v1) share and an Antix trying to connect to it.

      Host Maschine:
      Machine Type: Windows 10 Home
      Machine Name: Win10H-PC
      Machine IP: 192.168.0.100
      Workgroup: WORKGROUP
      Share name: win10share
      Username: Admin
      Password: AdminPW

      Antix (Remote) Machine:
      Username: antix
      Password: antix
      Mount Point: /home/antix/win10share

      The share on Windows is “free 4 all” (== 777) type and it’s up an running …
      (Hint: Win 10 will disable deprecated SMB v1 shares after couple of days if not used and they have to be explicitly activated – it’s not a topic here).

      From Antix side, one can connect to that share easily from cmd, simply by using:

      sudo mkdir /mnt/win10share
      sudo mount -t cifs //192.168.0.100/win10share /mnt/win10share -o user=Admin

      Drawback of this method is, that (normal) user Antix can see the share and can read the files in it but it can’t write to a share or create new files.

      To be able to write to that share, it has to create the mount point somewhere under its own directory, where it has read/write rights.
      Additionally, it has to out find its own uid and gid first (id -u USERNAME and id -g USERNAME; if the first and only user, it’ll be 1000 for both).

      id -u antix
      id -g antix
      mkdir ~/win10share
      sudo mount -t cifs -o username=Admin,password=AdminPW,uid=1000,gid=1000 //192.168.0.100/win10share /home/antix/win10share

      Press Enter and our user Antix can happily read and write to the win10share, mounted in a local directory, just beside Documents, Photos and Videos.

      Now my question:

      Connect Shares asks a couple of easy (if one understands them) questions.

      REMOTE=192.168.1.28
      SAMBA=y
      WORKGROUP=WORKGROUP
      SHARESUSER=win10share –> NO IDEA With or w/o IP? with slash or backslash?
      CREDAUTO=y
      CREDNAME=Admin
      CREDPASS=AdminPW
      SHARESGUEST=n –> Windows 10 will reject anonymous login
      SAMBAOPT= –> NO IDEA
      NFS=y
      SHARESIPDNS= –> NO IDEA how to write the path, like SHARESUSER
      NFSOPT=rw –> NO IDEA if it needs more then rw (read / write)

      Can anybody who understands it, finish this imaginary configuration file so that it works?

      Many thanks!

      #12852
      Forum Admin
      dolphin_oracle
        Helpful
        Up
        0
        ::

        so the template file should have some comments, but I do see some confusion in your output.

        # -------------
        # Remote System
        # -------------
        
        # The name or IP address of the remote system serving the share(s)
        # Examples
        #   REMOTE=shareserver
        #   REMOTE=192.168.1.50 
        REMOTE=192.168.1.28
        
        # ------------
        # Samba Shares
        # ------------
        
        # Enable/disable the mounting of Samba shares from the remote system
        # When disabled, all other entries in "Samba Shares" section are ignored
        # Leave empty to disable mounting, add y to enable mounting
        # Examples
        #   SAMBA=
        #   SAMBA=y
        SAMBA=y
        
        # The name of the domain in which the remote system serves Samba shares(s)
        # Examples
        #   WORKGROUP=company
        #   WORKGROUP=workgroup
        WORKGROUP=WORKGROUP
        
        # Samba shares on the remote system that require a user name and password
        # Leave empty to disable mounting shares of this type
        # Each listed share must include only the share name terminated by a comma
        # Multiple shares must be specified as a comma separated list
        # A space immediately before or immediately after a comma is not allowed
        # Examples
        #   SHARESUSER=
        #   SHARESUSER=homes,
        #   SHARESUSER=accounts,homes,video clips,
        SHARESUSER=win10share,
        #
        # Enable/disable automatically supplying user name and password to remote Samba server
        # When disabled a request to manually input credentials is displayed
        # Leave empty to disable automatic credentials mode, add y to enable automatic credentials mode
        # Examples
        #   CREDAUTO=
        #   CREDAUTO=y
        CREDAUTO=y
        #
        # The name and password to be supplied when automatic credentials mode is enabled
        # When automatic credentials mode is disabled, these entries are ignored and may be left empty
        # Examples
        #   CREDNAME=popeye
        #   CREDPASS=spinach
        CREDNAME=Admin
        CREDPASS=AdminPW
        
        # Samba shares on the remote system that do not require a user name and password
        # The shares must allow access to guests
        # Leave empty to disable mounting shares of this type
        # Each listed share must include only the share name terminated by a comma
        # Multiple shares must be specified as a comma separated list 
        # A space immediately before or immediately after a comma is not allowed
        # Examples
        #   SHARESGUEST=
        #   SHARESGUEST=anyone,
        #   SHARESGUEST=anyone,guest only,
        SHARESGUEST=
        
        # Options to be applied when mounting Samba shares (both with and without a password)
        # Leave empty to disable the use of options
        # An option must be terminated by a comma
        # Multiple options must be specified as a comma separated list
        # A space immediately before or immediately after a comma is not allowed
        # Examples
        #   SAMBAOPT=
        #   SAMBAOPT=nounix,cache=none,
        SAMBAOPT=
        
        # --------------------
        # NFS Shares (Exports)
        # --------------------
        
        # Enable/disable the mounting of NFS shares from the remote system
        # When disabled, all other entries in "NFS Shares (Exports)" section are ignored
        # Leave empty to disable mounting, add y to enable mounting
        # Examples
        #   NFS=
        #   NFS=y
        NFS=
        
        # NFS shares on the remote system that do not require a user name and password
        # The shares must be accessible by a local system that has a vaild IP address or DNS name
        # Each listed share must include the full path of the exported directory on the remote system
        # Each listed share must be terminated by a comma
        # Multiple shares must be specified as a comma separated list
        # A space immediately before or immediately after a comma is not allowed
        # Examples
        #   SHARESIPDNS=/home/nfs/backups,
        #   SHARESIPDNS=/home/nfs/audio clips,/home/nfs/backups,/home/nfs/images,
        SHARESIPDNS=
        
        # Options to be applied when mounting NFS shares
        # Leave empty to disable the use of options
        # An option must be terminated by a comma
        # Multiple options must be specified as a comma separated list
        # A space immediately before or immediately after a comma is not allowed
        # Examples
        #   NFSOPT=
        #   NFSOPT=rw,hard,intr,timeo=30,retry=0,
        NFSOPT=
        

        note 2 changes.

        1. there is a comma after the share name

        2. NFS is not enabled, since you aren’t using it. That’s Network File System shares, mostly used by folks in an “all” linux environment, and not used by windows normally, and certainly in your case.

        #12853
        Anonymous
          Helpful
          Up
          0
          ::

          That worked like a charm — many thanks! πŸ™‚ πŸ™‚ πŸ™‚

          I was actually reading the sample .conf file and noticed that “comma separated” thingy.
          I forgot it in my post but, didn’t bother to edit it because of that.
          The rest would still stay “NO IDEA”, with or w/o comma. πŸ˜‰

          P.S. How one can add <Solved> to a post?

          #12855
          Forum Admin
          dolphin_oracle
            Helpful
            Up
            0
            ::

            edit the first post and add [solved] to the title.

            thanks!!!

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