To access a Microsoft Windows share from a CentOS Linux server there are a few commands that worked for this configuration: Microsoft Windows Server 2003 and CentOS 5.8. This is a quick and dirty guide assumes that a Windows share already exists and uses root. In a production environment, an alternate user would be more appropriate.
From the Linux server.
Create an empty folder.
Mount the Windows share.
mount -t cifs //IP.AD.DR.ESS/share -o username=username,password=password /mnt/share
According to the comment below, UTF8 is needed in cases. I have added it here, however, haven’t personally tested – yet.
mount -t cifs //IP.AD.DR.ESS/share -o username=username,password=password,iocharset=utf8 /mnt/share
To make this a perminent mount, edit the /etc/fstab and append the following line to the end of the file.
//IP.AD.DR.ESS/share /mnt/share cifs root,uid=0,ro,suid,username=username,password=password 0 0
Re-mount the /etc/fstab without restarting the computer.
Of course, there are many variables that can be changed. like the filesystem, user, uid, whether or not the mount will be read-only “ro” or read-write “rw”.
Actually, for this to really work , the UTF-8 option needs to be passed to the mount. I know this from my experience with XUbuntu 11 and CentoS6.2 .