Disable "Share via LAN"

Is it possible to disable file sharing in 3.0.x and 3.1.x firmwares? There is a toggle button behind “Share via LAN”, but it always snaps back to on when I press it.

You can ssh to the router and modify /etc/samba/smb.conf.template

Or just remove samba