ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Samba problem

    SAM-SD
    samba linux network storage
    3
    7
    2.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stacksofplatesS
      stacksofplates
      last edited by stacksofplates

      So I have a weird problem. I have 10 samba shares set up. I have groups set up, two of which are "shop" and "office." When I chown a share with jhooks:shop I can access it over the network. However if I use jhooks:office I cannot. I am a member of both groups. Here's a section from smb.conf:

      [Office Documents]
                     path= /mnt/files/Office
                     valid users = @office
                     guest ok = no
                     writable  = yes
                     browsable = yes
      

      Any folder that's owned by the group "office" I cannot access via the network share, it says I don't have permission. However, on CentOS itself if I'm logged in under user jhooks I can access the folder.

      Any ideas? Thanks in advance.

      1 Reply Last reply Reply Quote 2
      • scottalanmillerS
        scottalanmiller
        last edited by

        Sounds like a primary / secondary group issue. Switch your primary group and see if the access flips.

        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          Your primary group in UNIX is the one listed in /etc/passwd.

          Your secondary groups are the ones that you are listed under in /etc/group

          1 Reply Last reply Reply Quote 0
          • stacksofplatesS
            stacksofplates
            last edited by stacksofplates

            So my primary group was "jhooks". I changed it to "office" and logged out and back in and confirmed that was the new group. Restarted samba and still the same thing.

            I also changed the section for Office Documents to valid users = jhooks and I still can't get in.

            1 Reply Last reply Reply Quote 0
            • stacksofplatesS
              stacksofplates
              last edited by

              Well I did some more goofing around. I deleted the office group and then readded it. Restarted samba probably 900 times. Tried different groups for the office folder. For some reason it's working now. Thanks again.

              1 Reply Last reply Reply Quote 0
              • stacksofplatesS
                stacksofplates
                last edited by

                So I figured it out. Just like most every other problem I've had, it was something stupid I did. I initially started with a user "john" and set up permissions but decided later to use "jhooks". I had accessed the shares with the "john" username first and that's why some worked. I never added the jhooks username to samba (must have forgot since some shares were working) and that's why I couldn't log into the other shares with that username.

                That will teach me to try to do this stuff on Friday night when I'm tired.

                DustinB3403D 1 Reply Last reply Reply Quote 4
                • DustinB3403D
                  DustinB3403 @stacksofplates
                  last edited by

                  @johnhooks said:

                  So I figured it out. Just like most every other problem I've had, it was something stupid I did. I initially started with a user "john" and set up permissions but decided later to use "jhooks". I had accessed the shares with the "john" username first and that's why some worked. I never added the jhooks username to samba (must have forgot since some shares were working) and that's why I couldn't log into the other shares with that username.

                  That will teach me to try to do this stuff on Friday night when I'm tired.

                  Well worse things have happened, it could've been a client outage 🙂

                  1 Reply Last reply Reply Quote 3
                  • 1 / 1
                  • First post
                    Last post