Adding Samba Shares to a Linux Client
Note: if you have Linux clients talking to a Windows server, then you'll need to follow the instructions in this section BUT if you have Linux clients talking to a Linux server, then you should be using NFS to link the two instead of Samba.
For a Linux client to access a Windows server using Samba, you just need to append a line to mount each share to the Linux client's /etc/fstab file. For example:
//<Samba server IP>/<Samba share name> <local mount point> cifs <User options> 0 0
//22.214.171.124/docs /mnt/samba cifs credentials=/etc/samba/smbUser,noexec 0 0
The above example, points to a text file (-called /etc/samba/smbUser) which specifies the user and password to use when connecting, rather than hard-coding them directly into the /etc/fstab file. If you choose to do the same, then you'll then need to create this file in the following format:
password=<samba user pw>
Once done, you should tighten up the file privileges so only root can see it:
$ chmod 550 /etc/samba/smbUser
The Samba drive should then auto-mount when your client starts up!