I have my server set up to server files using Samba (the windows filesharing protocol) now called CIFS. I wanted to use some authentication for the read/write share so here is how to do it.
Make a file called /etc/samba.credentials, owned by root:root, with permissions 0600, with these contents:
Then add a line like this to your /etc/fstab:
//server/sharename /mount/point cifs auto,credentials=/etc/samba.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=youruser,gid=yourgroup,nounix 0 0
Then it should be automatically mounted when you login!