Announcement

Collapse
No announcement yet.

I can't shared folders or use Samba

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I can't shared folders or use Samba

    Hello.
    Recently, I installed kubuntu in my laptop.
    I installed samba and also system-config-samba.
    When start system-config-samba, I type my password but not open any.
    I can't or I don't know how config my laptop for shared folders with my tower, without username and password.

    Thanks in advanced.

    PD: Sorry for my english

    #2
    In dolphin, right click the folder and select properties and sharing.

    Comment


      #3
      Originally posted by mr_raider View Post
      In dolphin, right click the folder and select properties and sharing.
      Thanks.
      I made this, but from the other computer, I can access to shared folders, but only view, I can't writte, and want writte in this folders

      Regards!

      Comment


        #4
        Double post
        Last edited by Rod J; Jan 25, 2018, 05:28 AM.
        Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
        Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

        Comment


          #5
          It could still be a bug in how system-config-samba is set up.

          If you right mouse click on the Kicker icon (Start menu) and choose "Edit applications", navigate to System, Samba you can see that the Command to start has "gksu system-config-samba" (at least it did here in K14.04, it may be different in your Kubuntu version). The problem is that gksu isn't installed in KDE by default as it's GTK (Gnome) version of kdesudo. Try changing the command to: "kdesudo system-config-samba".

          BUT, you may still run into problems running a gui app like system-config-samba as root in the later versions of Kubuntu because of security changes made. I'm not sure about this as I'm still running K14.04 here.

          The easiest way if you still can't get system-config-samba to run is probably to manually edit the file that the system-config-samba gui changes (/etc/samba/smb.conf). Down the bottom you should see your current shares. These are mine:

          Code:
          [Documents]
          	path = /home/rod/Documents
          ;	writeable = No
          ;	browseable = yes
          	valid users = rod
          
          [Downloads]
          	path = /home/rod/Downloads
          ;	writeable = No
          ;	browseable = yes
          	valid users = rod
          Obviously you would want to change the "writeable" lines to "yes" in your case. Hopefully that will work and you should be able to write to your shares.
          Last edited by Rod J; Jan 25, 2018, 05:30 AM.
          Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
          Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

          Comment


            #6
            Originally posted by Rod J View Post
            It could still be a bug in how system-config-samba is set up.

            If you right mouse click on the Kicker icon (Start menu) and choose "Edit applications", navigate to System, Samba you can see that the Command to start has "gksu system-config-samba" (at least it did here in K14.04, it may be different in your Kubuntu version). The problem is that gksu isn't installed in KDE by default as it's GTK (Gnome) version of kdesudo. Try changing the command to: "kdesudo system-config-samba".
            BUT, you may still run into problems running a gui app like system-config-samba as root in the later versions of Kubuntu because of security changes made. I'm not sure about this as I'm still running K14.04 here.
            Yes, I view that gsku are not installed.
            I made the changes that you indicate, but, like you indicate, continue with not work, not open system-config-samba.

            The easiest way if you still can't get system-config-samba to run is probably to manually edit the file that the system-config-samba gui changes (/etc/samba/smb.conf). Down the bottom you should see your current shares. These are mine:

            Code:
            [Documents]
               path = /home/rod/Documents
            ;    writeable = No
            ;    browseable = yes
               valid users = rod
            
            [Downloads]
               path = /home/rod/Downloads
            ;    writeable = No
            ;    browseable = yes
               valid users = rod
            Obviously you would want to change the "writeable" lines to "yes" in your case. Hopefully that will work and you should be able to write to your shares.
            I search in my file, but not appears any about "[Documents]".

            I made some changes in this file, in the final part, but continue not work, after some changes, my final part of this file is this:

            Code:
            #======================= Share Definitions =======================
            
            # Un-comment the following (and tweak the other settings below to suit)
            # to enable the default home directory shares. This will share each
            # user's home directory as \\server\username
            ;[homes]
            ;   comment = Home Directories
            ;   browseable = yes
            
            # By default, the home directories are exported read-only. Change the
            # next parameter to 'no' if you want to be able to write to them.
            ;   read only = no
            
            # File creation mask is set to 0700 for security reasons. If you want to
            # create files with group=rw permissions, set next parameter to 0775.
            ;   create mask = 0775
            
            # Directory creation mask is set to 0700 for security reasons. If you want to
            # create dirs. with group=rw permissions, set next parameter to 0775.
            ;   directory mask = 0775
            
            # By default, \\server\username shares can be connected to by anyone
            # with access to the samba server.
            # Un-comment the following parameter to make sure that only "username"
            # can connect to \\server\username
            # This might need tweaking when using external authentication schemes
            ;   valid users = %S
            
            # Un-comment the following and create the netlogon directory for Domain Logons
            # (you need to configure Samba to act as a domain controller too.)
            ;[netlogon]
            ;   comment = Network Logon Service
            ;   path = /home/samba/netlogon
            ;   guest ok = yes
            ;   read only = yes
            
            # Un-comment the following and create the profiles directory to store
            # users profiles (see the "logon path" option above)
            # (you need to configure Samba to act as a domain controller too.)
            # The path below should be writable by all users so that their
            # profile directory may be created the first time they log on
            ;[profiles]
            ;   comment = Users profiles
            ;   path = /home/wonder/
            ;   guest ok = yes
            ;   browseable = yes
            ;   create mask = 0755
            ;   directory mask = 0755
            
            [printers]
              comment = All Printers
              browseable = no
              path = /var/spool/samba
              printable = yes
              guest ok = no
              read only = yes
              create mask = 0700
            
            # Windows clients look for this share name as a source of downloadable
            # printer drivers
            [print$]
              comment = Printer Drivers
              path = /var/lib/samba/printers
              browseable = yes
              read only = yes
              guest ok = no
            # Uncomment to allow remote administration of Windows print drivers.
            # You may need to replace 'lpadmin' with the name of the group your
            # admin users are members of.
            # Please note that you also need to set appropriate Unix permissions
            # to the drivers directory for these users to have write rights in it
            ;   write list = root, @lpadmin
            I don't know if, my changes, are bad changes, but continue with the same, can access to shared folders (shared folders configured with dolphin) but I can't writte.

            Thank you!

            Comment


              #7
              I think you misunderstood my explanation, I was in a hurry last night so I will try to explain better here.

              You need to edit the file /etc/samba/smb.conf (it is owned by root so it should prompt for your password in order to save the file).

              Add the following paragraphs to the end of the file (these two paragraphs are mine, just showing you an example. You will need to change the text to suit your situation, replace <user> with your user name and the name of the folders you want to share. One paragraph for each folder, as many as you want to share):

              Code:
              [Documents]
              	path = /home/<user>/Documents
              ;	writeable = yes
              ;	browseable = yes
              	valid users = <user>
              
              [Downloads]
              	path = /home/<user>/Downloads
              ;	writeable = yes
              ;	browseable = yes
              	valid users = <user>
              Hope that works for you!
              Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
              Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

              Comment


                #8
                Originally posted by wonder View Post
                Thanks.
                I made this, but from the other computer, I can access to shared folders, but only view, I can't writte, and want writte in this folders

                Regards!
                Dolphin and KDE no longer create main samba shares in smb.conf

                They use samba usershares

                Your shares are defined in

                /var/lib/samba/usershares

                Samba uses the same usernames as your Linux username, with the same permissions. You must however define a password separately.

                Define a password for your user

                sudo smbpasswd -a username

                Where username is your account.

                You will now need to enter the password to access the shares, and permissions will be defined in accordance with your user.
                Last edited by mr_raider; Jan 25, 2018, 07:58 PM.

                Comment


                  #9
                  Originally posted by Rod J View Post
                  I think you misunderstood my explanation, I was in a hurry last night so I will try to explain better here.

                  You need to edit the file /etc/samba/smb.conf (it is owned by root so it should prompt for your password in order to save the file).

                  Add the following paragraphs to the end of the file (these two paragraphs are mine, just showing you an example. You will need to change the text to suit your situation, replace <user> with your user name and the name of the folders you want to share. One paragraph for each folder, as many as you want to share):

                  Code:
                  [Documents]
                     path = /home/<user>/Documents
                  ;    writeable = yes
                  ;    browseable = yes
                     valid users = <user>
                  
                  [Downloads]
                     path = /home/<user>/Downloads
                  ;    writeable = yes
                  ;    browseable = yes
                     valid users = <user>
                  Hope that works for you!
                  Ok Rod, now understand perfect
                  All right, but a little doubt: In last line, valid users, here indicate id user or username?

                  Originally posted by mr_raider View Post
                  Dolphin and KDE no longer create main samba shares in smb.conf

                  They use samba usershares

                  Your shares are defined in

                  /var/lib/samba/usershares

                  Samba uses the same usernames as your Linux username, with the same permissions. You must however define a password separately.

                  Define a password for your user

                  sudo smbpasswd -a username

                  Where username is your account.

                  You will now need to enter the password to access the shares, and permissions will be defined in accordance with your user.
                  Thanks for this explanation

                  I will try with this two methods

                  Thank you!!

                  Comment


                    #10
                    Hello.
                    Sorry for the delay, until today, I can't try this, today, I try, explain the results:

                    Originally posted by Rod J View Post
                    I think you misunderstood my explanation, I was in a hurry last night so I will try to explain better here.

                    You need to edit the file /etc/samba/smb.conf (it is owned by root so it should prompt for your password in order to save the file).

                    Add the following paragraphs to the end of the file (these two paragraphs are mine, just showing you an example. You will need to change the text to suit your situation, replace <user> with your user name and the name of the folders you want to share. One paragraph for each folder, as many as you want to share):

                    Code:
                    [Documents]
                       path = /home/<user>/Documents
                    ;    writeable = yes
                    ;    browseable = yes
                       valid users = <user>
                    
                    [Downloads]
                       path = /home/<user>/Downloads
                    ;    writeable = yes
                    ;    browseable = yes
                       valid users = <user>
                    Hope that works for you!
                    Ok, I add this to my file:
                    Code:
                    [Documents]    path = /home/wonder/Documents
                    ;    writeable = yes
                    ;    browseable = yes
                       valid users = wonder
                    
                    [Downloads]
                       path = /home/wonder/Downloads
                    ;    writeable = yes
                    ;    browseable = yes
                       valid users = wonder
                    With this, I can't access, appears this 2 folders in samba shared, when click in one, prompt username and password.

                    For this reasson, I made this:
                    Originally posted by mr_raider View Post
                    Dolphin and KDE no longer create main samba shares in smb.conf

                    They use samba usershares

                    Your shares are defined in

                    /var/lib/samba/usershares

                    Samba uses the same usernames as your Linux username, with the same permissions. You must however define a password separately.

                    Define a password for your user

                    sudo smbpasswd -a username

                    Where username is your account.

                    You will now need to enter the password to access the shares, and permissions will be defined in accordance with your user.
                    I create this password and now, yes I can access.

                    But continue, I can't add file or folder, indicate only read when try to create folder, appears error when try to create text file.

                    Thank you!!

                    Comment


                      #11
                      On the host computer does the user have write permissions?

                      Sent from my ONEPLUS A5010 using Tapatalk

                      Comment


                        #12
                        The semicolons mean "ignore this line". So you have:
                        Code:
                        [Documents]
                        path = /home/wonder/Documents
                        ;    writeable = yes
                        ;    browseable = yes
                        valid users = wonder
                        
                        
                        [Downloads]
                        path = /home/wonder/Downloads
                        ;    writeable = yes
                        ;    browseable = yes
                        valid users = wonder
                        which is the same as having
                        Code:
                        [Documents]
                        path = /home/wonder/Documents
                        valid users = wonder
                        
                        
                        [Downloads]
                        path = /home/wonder/Downloads
                        valid users = wonder
                        I think you want:
                        Code:
                        [Documents]
                        path = /home/wonder/Documents
                        writeable = yes
                        browseable = yes
                        valid users = wonder
                        
                        
                        [Downloads]
                        path = /home/wonder/Downloads
                        writeable = yes
                        browseable = yes
                        valid users = wonder

                        Please Read Me

                        Comment


                          #13
                          Originally posted by mr_raider View Post
                          On the host computer does the user have write permissions?

                          Sent from my ONEPLUS A5010 using Tapatalk
                          Yes, I have only one user, and have all permissions.

                          Originally posted by oshunluvr View Post
                          The semicolons mean "ignore this line". So you have:
                          Code:
                          [Documents]
                          path = /home/wonder/Documents
                          ;    writeable = yes
                          ;    browseable = yes
                          valid users = wonder
                          
                          [Downloads]
                          path = /home/wonder/Downloads
                          ;    writeable = yes
                          ;    browseable = yes
                          valid users = wonder
                          which is the same as having
                          Code:
                          [Documents]
                          path = /home/wonder/Documents
                          valid users = wonder
                          
                          [Downloads]
                          path = /home/wonder/Downloads
                          valid users = wonder
                          I think you want:
                          Code:
                          [Documents]
                          path = /home/wonder/Documents
                          writeable = yes
                          browseable = yes
                          valid users = wonder
                          
                          [Downloads]
                          path = /home/wonder/Downloads
                          writeable = yes
                          browseable = yes
                          valid users = wonder
                          My apologies for my error...
                          Like you indicate, the error are in ";"
                          I deleted the ";" and now, works fine, I have access and I can writte...

                          Thank you very much!!

                          PD: I'm new in kubuntu, and this forum and her people, I think are fantastic!

                          Comment


                            #14
                            Yeah, that's an easy mistake. Must folks new to these sorts of config files don't understand all of the symbols. Depending on the application, you may see ; # or ! which usually mean "everything after this is a remark" so it's not read by the program. Glad it was that easy of a fix.

                            Welcome to Linux, Kubuntu, and the forum.

                            Please Read Me

                            Comment


                              #15
                              Yes, always when I edited files, I add or deleted #, but until the moment, never ;

                              Thanks for all!

                              Comment

                              Working...
                              X