* We need to create a credential file to mount on startup:
<code>sudo nano /root/.smbcredentials</code>
*Add the following lines: (You must change hda_username and hda_password to the correct user name and password for the hda to connect to):
<code>username=hda_usernamepassword=hda_password</code>
* 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:
<code>sudo chmod 700 /root/.smbcredentials</code>
* Let's back up our fstab: sudo cp /etc/fstab /etc/fstab_old** If needed you may return to the original this way: <code>sudo mv /etc/fstab_old /etc/fstab </code>
* Now we edit fstab:
<code>sudo nano /etc/fstab</code>
* Add this line at the end:
<code>//NAS-address/share hda/varmusic /hdamedia/files music cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 </code>
* Finally, test your settings to make sure they work:
<code>sudo mount -a</code>