Can't start samba service because of some issue with AppArmor

I’m using Tumbleweed, I tried to setup samba, but there’s some problem at startup.

localhost:/home/afoh # systemctl status smb.service

Jul 24 15:23:09 localhost.localdomain update-apparmor-samba-profile[11845]: generating profile sniplet failed
Jul 24 15:23:09 localhost.localdomain systemd[1]: smb.service: Control process exited, code=exited, status=1/>
Jul 24 15:23:09 localhost.localdomain systemd[1]: smb.service: Failed with result ‘exit-code’.
Jul 24 15:23:09 localhost.localdomain systemd[1]: Failed to start Samba SMB Daemon

I tried changing smbd and samba related apparmor entries to complaints but it didn’t work. Help.

Not sure quite what you tried, but see if this helps

I still can’t start it

You could at least show the exact commands that you used here. We’re not over your shoulder to see what you’ve done specifically.

Please show the output of

aa-status
aa-unconfined

I solved it from a link within the link you sent. I just couldn’t get samba service to start with:

systemctl start smb

It failed.

Apparently all that was needed was to update /etc/apparmor.d/local/usr.sbin.smbd-shares with the whitelist of shares automatically generated at /etc/apparmor.d/local/usr.sbin.smbd-shares.new
by doing:

sudo cp /etc/apparmor.d/local/ usr.sbin.smbd-shares.new /etc/apparmor.d/local/usr.sbin.smbd-shares

and also switching all those smb related apparmor entries to complain

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.