Assuming that you have your Unix group set up correctly, you should be able to use a share configuration similar to the following:
[ShareName]
path = /path/to/share
guest ok = no
guest only = no
write list = @engineering
read list =
valid users = @engineering
The @ sign before the name of the group tells samba that this is a group name instead of a user name.
If you're allowing the group write access through samba, but you are still having trouble writing to the share (but you can authenticate correctly) then you should check file permissions and your force user and force group options. These can be set globally or per-share.
If this doesn't help, you should provide more information about the trouble you're running into.
Answer from jkt123 on Stack ExchangeThank you @Morbius1 for your help.
After few more hours of trying things I found the answer.
It turns out the problem wasn't with the Linux machine and therefore not with the Samba share.
My Windows 10 machine kept the shares I had previous in the background. I couldn't see them in the explorer but when I ran net use in the CMD I found there were 2 still linked (from previous mounting attempts). I then used net use * /delete to remove those.
Hope this helps someone else so he and or she doesn't waste 3 days pulling their hair out. If you have any questions, send me a message.
I've never seen this happen when the server only has one share especially one that allows guest access. Did you have a different share that required credentials at one point?
Anyway, The Linux samba server can be addressed 2 different ways: By ip address and my name ( mDNS or NetBIOS ). Windows regards these as two different hosts even though they are the same machine.
What I would do is address the Linux samba server by it's mDNS host name: \\hostname.local\media
Note:
[1] Run hostname on the Linux server to find the hostname of the machine then when you address it in Win10 add a .local at the end.
[2] Win10 can do mDNS by default. Ubuntu desktop can as well but if you are using Ubuntu Server you need to install a package:
sudo apt install avahi-daemon
[3] If you intend on keeping this as a guest accessible share I suggest removing sjonnie from the samba password database ( smbpasswd -x sjonnie ). I think this is contributing to the problem.