Samba problem
-
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.
-
Sounds like a primary / secondary group issue. Switch your primary group and see if the access flips.
-
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
-
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. -
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.
-
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.
-
@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