Use o autofs para conseguir isso
#Create sharepoint at: /sharebase/share
service autofs stop
nano /etc/auto.master
Add: /sharebase /etc/auto.cifs --timeout=300 --ghost
nano /etc/auto.cifs
Add: share -fstype=cifs,domain=mydomain,uid=www-data,gid=www-data,iocharset=utf8,file_mode=0777,dir_mode=0777,credentials=/root/.cifs ://SAMBA.share/
nano /root/.cifs
Add: username=myusername
Add: password=mypassword
service autofs start