I got this from this webpage: http://askubuntu.com/questions/157128/proper-fstab-entry-to-mount-a-samba-share-on-boot
(and copied it so it doesn't disappear)
I've been through exactly this same issue this morning with 12.04 and here's how I got it working:
Install cifs-utils (even if you already have Samba and related packages installed):
sudo apt-get install cifs-utils
Edit /etc/fstab
and add your entry:
//server/share /pathto/mountpoint cifs credentials=/home/username/.smbcredentials,uid=shareuser,gid=sharegroup 0 0
Create the .smbcredentials file in your home directory:
username=shareuser password=sharepassword domain=domain_or_workgroupname
Make sure you secure your ~/.smbcredentials
file:
chmod 0600 ~/.smbcredentials
Finally, test the mount with:
sudo mount -a
...and you should be good to go!