To mount a remote share In Debian Squeeze, make sure that cifs-utils is installed, otherwise you would receive the following error:
mount: wrong fs type, bad option, bad superblock on //x.x.x.x/share
to install cifs-utilis, just use apt-get: apt-get install cifs-utilis.
Now you can mount the share on your local filesystem:
mkdir -p /mnt/yourShare
mount -t cifs //x.x.x.x/share/ -o username=username,password=password /mnt/yourShare -o iocharset=utf8,file_mode=0777,dir_mode=0777
If you want to mount this share automatically when your system loads, just add this line to your /etc/fstab file:
//x.x.x.x/share/ /mnt/yourShare cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
As you can see, I'm not writing the credentials directly in fstab file because this file can be viewed by anyone. To store your credentials in /root/.credentials, do:
sudo nano /root/.credentials
and add the followin text:
username=your_smb_username
password=your_smb_password