Changes

From Amahi Wiki
Jump to: navigation, search
363 bytes added ,  19:43, 12 May 2010
no edit summary
Everthing I did below is done in putty from a cli interface, Install download putty and enter you hda name or address in the address line. Login as root or "su -".
* 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 NAS_username and hda_password NAS_password to the correct user name and password for the NAS to connect to):   <code>username=NAS_username</code> <code>password=NAS_password</code>
<code>username=hda_username</code>
<code>password=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< * Add this line at the end (all in one line):  /code>/server/share /var/hda/files/music cifs credentials=/root /.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
* Add It may be the case that you do not know exacly the name of the NAS server or the share name as it exports it out. To find that, you can use this from the command line at : # smbtree* If the end: share name has spaces, escape them with \040 (wtf? yeah in octal \040), e.g.
//hdaserver/music My\040Documents/media/music cifs credentials=/root /.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0My\040Music
* Finally, test your settings to make sure they work:
<code>sudo mount -a</code>
Trusted, Bots, Bureaucrats, emailconfirmed, Administrators
3,789

edits