I strongly advise against using fstab to mount network shares as your system may hang if network is not available for some reason - and believe me - you don’t want that.
This is a utility script using gio to mount
This is an example on how to create a mount/automount set of units
Technically you create a file with the credentials e.g. /etc/samba/credentials
user=$SMBUSER
password=$SMBPASS
workgroup=$WORKGROUP
Then you supply that file in the mount options
//server/share cifs /mountpoint/sharename rw,_netdev,credentials=/etc/samba/credentials
More resources - search the Tutorials section using samba keyword