This question/problem must have come up several times without doubt, but nevertheless I'm still struggling with it (and it's beginning to spin!).
I have a Samba network share (just a regular, all-default share) which I would like to automount at boot, so all users can have read-write access to it.
My steps so far:
 On the server, I created a group called "machines", and added a new user "client-machine" to it.
 On the client, I created a group called "remote", and added a new system user "client-machine". In addition, I added the "remote" group as secondary group to an existing user ("user1").
 I added the following line to /etc/fstab:
# network shares on samba server
//192.168.x.y/Music /media/Music cifs defaults,acl,credentials=/root/.smbcredentials,iocharset=utf8,gid=remote,uid=client-machine,file_mask=0777,dir_mask=0777 0 0
Where /root/.smbcredentials contains the Samba user name ("client-machine") and password.
Believe it or not, but on reboot (or issuing "sudo mount -a") this actually works :-) On opening Nautilus (Ubuntu's file manager), the network share shows up. However, documents (both new or copied) end up with permissions -rw-r--r--, so there's no way I can edit any document after it has been created or copied.
I then started searching the web... :-( The suggestions I found implied using (a) ACL, (b) umask, (c) scripts to mount the shares on login instead of on boot. I've tried (a) and (b) until I found this helpful post on ACLs, umask and shared directories
. As considered (c), I found myriad suggestions, of which I couldn't decide which one was best.
Has anyone encountered the same issue? How did you cope with it? Any suggestions are more than welcome!