Okay, I think I have everything working. Unfortunately I was not able to figure out why it wasn’t working the first time. But here’s what I have now…
I enabled the firewall as per your instructions:
$ sudo systemctl enable --now firewalld
Created symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service → /usr/lib/systemd/system/firewalld.service.
Created symlink /etc/systemd/system/multi-user.target.wants/firewalld.service → /usr/lib/systemd/system/firewalld.service.
$ sudo firewall-cmd --permanent --zone="home" --list-services
dhcpv6-client mdns samba-client ssh
$ sudo firewall-cmd --permanent --zone="public" --list-services
dhcpv6-client ssh
$ sudo firewall-cmd --permanent --zone="home" --add-source="192.168.1.0/24"
success
$ sudo firewall-cmd --permanent --zone="home" --add-service="samba"
success
rebooted all 3 machines and I was still able to connect to my shares!
Next, I added the PAM stuff back into smb.conf along with the 2 folders I actually want to share, I removed the public folder, and I set usershare allow guests = no:
[global]
workgroup = WORKGROUP
server string = Manjaro Samba Server
server role = standalone server
log file = /var/log/samba/log.%m
max log size = 1000
guest account = nobody
map to guest = Bad Password
min protocol = SMB2
max protocol = SMB3
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
pam password change = yes
usershare path = /var/lib/samba/usershares
usershare max shares = 100
usershare allow guests = no
usershare owner only = yes
[documents]
path = /home/rob215x/Documents
guest ok = no
writable = yes
printable = no
force user = rob215x
[video]
path = /home/rob215x/Videos
guest ok = no
writable = yes
printable = no
force user = rob215x
rebooted all 3 machines AGAIN and I was still able to connect to my shares!
- I tried the anonymous login and I was denied (this is what I want!)
- I tried a different username and I was denied (good!)
So, in conclusion, I don’t know why it wasn’t working before. Besides some typo or mistake I’m not aware of, there are 3 main differences in this install:
- I did NOT install Thunar-shares-plugin this time.
- I ran all of the apparmor commands listed in your guide.
- I did NOT add the PAM stuff to my smb.conf until AFTER I had the shares working.
@linux-aarhus let me know if you have any thoughts and if I should mark this as solved. Thanks!!