Announcement

Collapse
No announcement yet.

Strange problem with SMB user shares

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

    Strange problem with SMB user shares

    I have two machines both running Kubuntu 13.10, and one has a problem sharing folders via the Share tab in Dolphin properties. Strangely, the other works fine. The only real difference is that one is 64-bit, the other 32-bit, apart from that they are set up pretty much the same.

    The issue is that on the 64-bit machine, once I've shared a folder I can't change the sharing properties (e.g. change sharing permissions, switch allow-guest, etc). I can change them in the tab and click OK, and there is no complaint, but the changes don't take effect. On the 32-bit machine it works fine.

    Perversely, I can run the "net usershare" command to do the same thing, and it works on both machines. It's just via Dolphin, nothing happens on one machine. The relevant file in /var/lib/samba/usershares is not written to at all, as there is no change in mod time.

    I can work round it either by using "net usershare", or by un-sharing the folder then re-sharing it with new parameters in Dolphin, but it's annoying and clearly should work.

    Can anyone verify this problem, or is it something weird with my machine?

    BTW, before anyone says "use NFS, not SMB", I also have Windows machines in the network (plus hardware with SMB shares). I am looking at making more use of NFS, but the reality is that SMB is still needed.

    TIA for any input.
    Rick

    #2
    RickPJ:

    Its been a long time since I've used Samba, but I do know that you have to install some additional libraries to enable sharing. If you look in the software center, do you have the needed Samba packages installed (Samba, Samba-Common, and possibly system-config-samba?) 32 bit may have one set of default packages, and 64 bit a slightly altered set of defaults.

    Shot in the dark, but I know that somethingorother like that messed me up years ago when I first tried using Samba. Not all of Samba (particularly the part setting up shares) got included in the base install. I had to add packages afterward.

    Frank.
    Linux: Powerful, open, elegant. Its all I use.

    Comment


      #3
      Hi Frank

      Nope, not that. Both systems have the same packages. In fact you don't even get the sharing options in Dolphin unless you have the right supporting stuff installed.

      Everything in Samba works fine, including user shares, it's just the wrinkle of changing settings of an existing share in Dolphin that fails. Bizarre!

      Rick

      Comment


        #4
        Try running Dolphin from a terminal and looking at the error messages, if any appear. I also assume you've verified folder/file permissions? I'd look into dmesg output, smb.conf and dolphinrc files too - comparing for differences between the machines. I'm not running SAMBA server on my desktop machine, so I can't test this - my SAMBA server is headless.

        BTW, but I'm sure you're already aware; there's no caveat to using both NFS and SAMBA on your linux machines. Doesn't address the issue directly of course, but solves it in another way. NFS = more secure, more stable, faster, etc. You could easily share the same folders using both protocals.

        Please Read Me

        Comment


          #5
          Originally posted by oshunluvr View Post
          You could easily share the same folders using both protocals.
          I would like you to expound on this. One of my samba shares is 'Homes'. When a user access samba and they have a /home folder, samba automagically mounts their homes share and noone else’s. I really haven’t dug too deeply into NFS, but it was my understanding I couldn't do the same thing with it. Do you happen to know how this could be done?
          I do not personally use Kubuntu, but I'm the tech support for my daughter who does.

          Comment


            #6
            Couldn't do which part? I presume you mean "automatically mount only the folders deemed accessible by the logged in user."

            AFAIK, the access restriction comes from the samba server and isn't really a mount restriction. Semantics really, but there's a difference. In answer to your question if I guessed it correctly, no NFS doesn't do this automatically that I know of. The more typical setup for NFS and sharing your /home is to have a single /home and have if accessed on all desktops - which is different. You can setup automounting using automount or other ways. I used Xstartup to control user specific mounting in the past. You could also create specific mounts for all users easily enough.

            Really depends on exactly what you're doing and how much security you desire how you should set it up. With NFS exporting /home it would be no different than having /home on the computer you're using. A simple "cd .." from your home shows you everyone's home folders, but not their contents IF you have your permissions set not to allow it.

            One of the security advantages to NFS is ownership and permissions are inherited unlike samba. This is why samba has the "homes" feature. NFS doesn't need it.

            Please Read Me

            Comment


              #7
              Originally posted by oshunluvr View Post
              One of the security advantages to NFS is ownership and permissions are inherited unlike samba. This is why samba has the "homes" feature. NFS doesn't need it.
              How is it inherited? I mean, it's not by userid, is it? My wife may be 1000 on her computer, but she's 1001 on the server. Does it use a user/password, like samba?
              I do not personally use Kubuntu, but I'm the tech support for my daughter who does.

              Comment


                #8
                Originally posted by Buddlespit View Post
                How is it inherited? I mean, it's not by userid, is it? My wife may be 1000 on her computer, but she's 1001 on the server. Does it use a user/password, like samba?
                Yes by userid. You need to use consistent UIDs (numerically, not text). The best practice is to use the same UIDs on shared systems. Think about a thumb drive formatted ext2. You could load files on it on one PC but not delete them on the other. You can also set and use id mapping by having usernames mapped in /etc/idmapd.conf on both the server and client. Then UIDs need not be identical, but this doesn't solve the thumb drive case.

                What I have done on my system is, along with consistent UIDs, public exports are set to a group ownership named "share" and all my users belong to this group. Then I set the GID "sticky bit" to force the GID to "share" and then everyone can read and write public folders no matter who posts the files. Then my wife can upload her photos to the server, and I can sort, edit, and delete them.

                Another way to do this is to map everyone to "nouser, nogroup" then all files are identical UID/GID. I prefer my method because I can tell who the source is of any particular file.

                If you decided to straighten out your UIDs, it's not very hard unless you have 100s of users.

                Please Read Me

                Comment


                  #9
                  Ya, I have multiple clients, most (five) in-network, two out-of-network. Out of those, two are linux (my wife and I) and everybody else is Windows. Everybody has their own ~/ folder and everybody can access the shares folder (and sub-folders). Only admin (root) can access everything, and that's only directly from the server or thru webmin
                  Last edited by Buddlespit; Jan 07, 2014, 05:36 PM. Reason: more info
                  I do not personally use Kubuntu, but I'm the tech support for my daughter who does.

                  Comment


                    #10
                    Frankly, if samba is working for you, I wouldn't bother switching. With that many windows boxes, leave well enough alone

                    Please Read Me

                    Comment


                      #11
                      Originally posted by oshunluvr View Post
                      Frankly, if samba is working for you, I wouldn't bother switching. With that many windows boxes, leave well enough alone
                      I'm with oshunluvr on this one! No sense rock'in the boat if its floating ok.

                      BTW: I think home directory sharing in samba is enabled in the default smb.conf file in /etc/samba
                      Here's the provided code from my smb.conf:
                      Code:
                      [homes]
                         comment = Home Directories
                         browseable = no
                      cheers,
                      bill
                      sigpic
                      A person who never made a mistake never tried anything new. --Albert Einstein

                      Comment


                        #12
                        Ya, got it covered:

                        Code:
                        #####===== Share Definitions =====#####
                        [Homes]
                           comment = Home Directories
                           browseable = no
                           read only = no
                           create mask = 0700
                           directory mask = 0700
                           valid users = %S
                        
                        [Shares]
                            path = /home/share
                            browseable = yes
                            read only = no
                            guest ok = yes
                            create mask = 0755
                            directory mask = 0755
                            force user = nobody
                            force group = nogroup
                        And, if you ask nicely, I share my global with you too
                        I do not personally use Kubuntu, but I'm the tech support for my daughter who does.

                        Comment

                        Working...
                        X