Libraries to be installed are samba-client, samba-common, cifs-utils
yum install samba-client samba-common cifs-utils
Create directory for shared drive
sudo mkdir -p /mnt/sharedDrive
Mount the Windows drive on CentOS server
sudo mount -t cifs //machinename/shareName -o username=<username>,password=<password> /mnt/sharedDrive
View a list of mounted drives
cat /proc/mounts
Un-mount an existing mounted drive
umount /mnt/sharedDrive
To permanently remove the share
rm -rf /mnt/sharedDrive
To mount a DFS share, add following in /etc/request-key.conf file
create cifs.spnego * * /usr/sbin/cifs.upcall -c %k
create dns_resolver * * /usr/sbin/cifs.upcall %k
- DFS share mount may not work using cifs-utils since its valid for CentOS-6 (or later) only
View the available shares on a non-DFS machine like so-
smbclient -L ‘//machinename’ -U ieams/nraj
Incase of non-DFS share mounting, one can use IP if machine name mounting doesnt work.
Reference:
http://www.cyberciti.biz/faq/mounting-windows-partition-onto-ubuntu-linux/
http://mikemstech.blogspot.in/2012/10/how-to-mount-dfs-share-in-linux.html
http://wiki.centos.org/TipsAndTricks/WindowsShares
http://www.thatsquality.com/articles/mounting-windows-smb-file-shares-using-cifs