Samba automount template not working

Problem is, I’m not sure of a simple way to do it, or it would have been done already.

The only practical way to add on the fly shares is by using ‘net usershare add’, and when you do that you must provide the usernames and permissions for those shares on the net usershare command line, it can’t be provided or overridden in the smb.conf.

And this is done from udisks-glue, whose conf file is not very user friendly, and not something we can really make user customisable.

What you can do though is if it suits your needs better, is disable the automount shares by changing browseable = yes in the [automount template] section to no, then add a custom smb-shares.conf file that manually adds your desired shares with any permissions you like.