Install the necessary dependencies

apt install cifs-utils

Check that we have the kernel module installed

lsmod | grep cifs

Mount the shared file system

mount -t cifs //<ruta compartida> /<ruta del _mount-point_ > -o username=<username>,uid=<uid>,gid=<gid>

In the above line the uid and gid parameters are used to specify the mount privileges.

To enable the mount during system startup, the /etc/fstab file is edited and the following line is added to it

////<ruta compartida> /<ruta del mount-point > cifs credentials=<fichero de credenciales> 0 0

As you can see, it is advisable to have the credentials stored in a separate file with the appropriate permissions so that it cannot be read by any user, as is the case of /etc/fstab.

# cat << EOF >> <fichero de credenciales>
username=<username>
password=<password>
EOF