This is important and after this text goes the TROUBLOESHOOTING:
http://ubuntuforums....ad.php?t=288534
If your samba server requires a password to access the shared files, you should create a credentials file so the username and password are hidden from prying eyes. If you don't have password protected access to your samba share, skip this section and start with the line that says "Now we edit fstab:".
To create a credentials file, do the following:
sudo nano /root/.smbcredentials
WARNING!!! Do not use a GUI text editor (like KATE) to create this file!!!
Add the following lines (change winusername and winpassword to the correct username and password for the samba/windows server you want to connect to):
username=winusername
password=winpassword
Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.
Now, change the permissions of the file so only root can read and edit it:
sudo chmod 700 /root/.smbcredentials
Now we edit fstab:
and at the end of the file, insert one (1) of the following 3 lines according to your needs. Make sure you change "netbiosname" and "sharename" to the correct names for the server you are trying to connect to. (if you don't know what these are, please see the next post)
For a password protected share with read/write permission.
//netbiosname/sharename /media/sharename cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
For a non-password protected share with read/write permission use this instead:
//netbiosname/sharename /media/sharename cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
For read only guest access:
//netbiosname/sharename /media/sharename cifs guest,iocharset=utf8 0 0
Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.
note: if you've used a text editor other than nano, make sure that there is a blank line at the end of this file.
Finally, test your settings to make sure they work:
If you get a folder on your desktop with your server shares, then you have configured everything correctly. If not, please see the "Troubleshooting" section below, review the howto, or post in the thread.
Now, your samba shares will be mounted every time you start the computer. If you are not connected to your network when you boot, this will not cause problems. The share will simply not appear on your desktop.
(...)